Hi,
we are using the topic permissions for restricting bindings and publishings on RabbitMQ. If now client performs a read or write that violates the topic permissions, the access is correctly refused.
We are working with the amqp-client developed in Java. We detected that then the channel that violates the topic permission is closed. As we want to have a reconnection or a clean shutdown of the connection and maybe a reconnect, it would be good to detect this. Checking the methods, we saw that we can add a ShutdownExceptionListener on the channel and on the connection. When now a topic permission violations happens the listener of the channel is called which would allow us to reconnect. But if the connection is closed (e.g., via administrator over the UI), both listeners for the connection and for the channel are triggered.
Thus, is there a suitable way to detect if the channel is closed, e.g., because of a topic permission violation or via the connection (error or manual close) as we do not want to unnecessarily perform reconnections.
Best regards,
Markus