akka-rabbitmq
akka-rabbitmq copied to clipboard
On Connection Reset Error and Warning is Logged
When the connection to RabbitMQ server is lost due to a java.net.SocketException the lib logs:
- ERROR close com.rabbitmq.client.AlreadyClosedException: connection is already closed due to connection error; cause: java.net.SocketException: Connection reset
- WARN akka://actor-name/user/amqp/subscriber disconnected
Can message 1. be avoided? For me it makes no sense to log it as error since it is already know that the connection was lost.
Message 1 is logged by line https://github.com/NewMotion/akka-rabbitmq/blob/8bb32bb2aeec9820408f67b0da5a6940b64c97f8/src/main/scala/com/newmotion/akka/rabbitmq/RabbitMqActor.scala#L27-L26
Message 2 is logged by line https://github.com/NewMotion/akka-rabbitmq/blob/8bb32bb2aeec9820408f67b0da5a6940b64c97f8/src/main/scala/com/newmotion/akka/rabbitmq/ChannelActor.scala#L163