-
Notifications
You must be signed in to change notification settings - Fork 585
Description
The RpcClient resets its consumer when a shutdown signal is received src/main/java/com/rabbitmq/client/RpcClient.java. However, it does not cancel the consumer like RpcClient.close() does. That means that if the broker restarts, and a new RpcClient is instantiated (because the old client has shut down and can't be used any more), a ShutdownSignalException is raised: Caused by: com.rabbitmq.client.ShutdownSignalException: channel error; protocol method: #method<channel.close>(reply-code=406, reply-text=PRECONDITION_FAILED - reply consumer already set, class-id=60, method-id=20)
As a workaround, I stored the RpcClient consumer externally and cancelled it once the RpcClient _consumer was set to null. Afterwards, I could instantiate a new RpcClient without causing the ShutdownSignalException.
RabbitMQ version: 3.7.7
Java client version: 5.3.0