akka-rabbitmq icon indicating copy to clipboard operation
akka-rabbitmq copied to clipboard

On Connection Reset Error and Warning is Logged

Open eadaniel opened this issue 2 years ago • 0 comments

When the connection to RabbitMQ server is lost due to a java.net.SocketException the lib logs:

  1. ERROR close com.rabbitmq.client.AlreadyClosedException: connection is already closed due to connection error; cause: java.net.SocketException: Connection reset
  2. 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

eadaniel avatar Jan 17 '22 14:01 eadaniel