This repository was archived by the owner on Sep 26, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 58
This repository was archived by the owner on Sep 26, 2025. It is now read-only.
Unreliable Channel caching in Sender #21
Copy link
Copy link
Closed
Description
TC
- Declare queue
- Try to declare queue with different params
com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-expires' for queue 'my-queue' in vhost '/': received '10800000' but current is '86400000', class-id=50, method-id=10)
at com.rabbitmq.client.impl.ChannelN.asyncShutdown(ChannelN.java:510) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.ChannelN.processAsync(ChannelN.java:346) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.AMQChannel.handleCompleteInboundCommand(AMQChannel.java:178) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.AMQChannel.handleFrame(AMQChannel.java:111) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:670) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.AMQConnection.handleReadFrame(AMQConnection.java:619) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.nio.NioLoop.run(NioLoop.java:150) ~[amqp-client-5.3.0.jar:5.3.0]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102]
- Try to declare another new queue
ER: queue declared
AR: got error
com.rabbitmq.client.AlreadyClosedException: channel is already closed due to channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - inequivalent arg 'x-expires' for queue 'my-queue' in vhost '/': received '10800000' but current is '86400000', class-id=50, method-id=10)
at com.rabbitmq.client.impl.AMQChannel.ensureIsOpen(AMQChannel.java:253) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.AMQChannel.asyncRpc(AMQChannel.java:354) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.AMQChannel.privateAsyncRpc(AMQChannel.java:315) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.AMQChannel.exnWrappingAsyncRpc(AMQChannel.java:152) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.ChannelN.asyncCompletableRpc(ChannelN.java:1565) ~[amqp-client-5.3.0.jar:5.3.0]
at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.asyncCompletableRpc(AutorecoveringChannel.java:901) ~[amqp-client-5.3.0.jar:5.3.0]
at reactor.rabbitmq.Sender.lambda$declareQueue$8(Sender.java:190) ~[classes/:na]
...
public Sender(SenderOptions options) {
...
this.channelMono = connectionMono.map(CHANNEL_CREATION_FUNCTION).cache();
}Sender always uses the same channel in bind(BindingSpecification), declareExchange(ExchangeSpecification), declareQueue(QueueSpecification), deleteExchange(ExchangeSpecification, boolean), deleteQueue(QueueSpecification, boolean, boolean), unbind(BindingSpecification) methods
so if it closes there is no way to use another.