-
Notifications
You must be signed in to change notification settings - Fork 622
Description
Code to reproduce issue - https://github.com/lukebakken/rabbitmq-dotnet-client-1245
Discussed in #1245
Originally posted by pabermod September 1, 2022
Hi, I have the following scenario:
- Connection configured with publisher acks.
- Auto recover connection is enabled
- With an open connection and IModel I try to send a message bigger than the default message max size with the method BasicPublish
- This method does not fail. Instead the event ModelShutdown of the IModel is fired.
I have a handler for that event that opens a new channel for the same connection. When openning the new channel I get the following error:
System.TimeoutException: Se excedió el tiempo de espera de la operación.
en RabbitMQ.Util.BlockingCell`1.WaitForValue(TimeSpan timeout)
en RabbitMQ.Client.Impl.SimpleBlockingRpcContinuation.GetReply(TimeSpan timeout)
en RabbitMQ.Client.Impl.ModelBase.ModelRpc(MethodBase method, ContentHeaderBase header, Byte[] body)
en RabbitMQ.Client.Framing.Impl.Model._Private_ChannelOpen(String outOfBand)
en RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.CreateNonRecoveringModel()
en RabbitMQ.Client.Framing.Impl.AutorecoveringConnection.CreateModel()`
I attach .Net project example for the problem that uses:
- Net461 (but also happens in Net6)
- Latest RabbitMQ.Client package
- Latest rabbitmq docker image: docker run --hostname my-rabbit --name some-rabbit -p 5672:5672 -p 15672:15672 rabbitmq:3-management
The example sends the content of the given file. Will close the channel is size is bigger than 134217728 bytes: