ScalaConsultants / reactive-rabbit

Reactive Streams driver for AMQP protocol. Powered by RabbitMQ library.
Apache License 2.0
184 stars 40 forks source link

Caught an exception while recovering queue : channel is already closed due to clean channel shutdown #47

Closed pocman closed 8 years ago

pocman commented 8 years ago

To replicate, run: Source.fromPublisher(Connection().consume(queue = queue)).runWith(Sink.ignore) with application.conf :

amqp {
  heartbeat = 2s
  automatic-recovery = true
  recovery-interval = 2s
}

Kill rabbitmq-server and restart. I will raise :

Caught an exception when recovering topology Caught an exception while recovering queue admin.assignments: channel is already closed due to clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0)
com.rabbitmq.client.TopologyRecoveryException: Caught an exception while recovering queue admin.assignments: channel is already closed due to clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0)
        at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.recoverQueues(AutorecoveringConnection.java:571)
        at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.recoverEntities(AutorecoveringConnection.java:523)
        at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.beginAutomaticRecovery(AutorecoveringConnection.java:451)
        at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.access$000(AutorecoveringConnection.java:53)
        at com.rabbitmq.client.impl.recovery.AutorecoveringConnection$1.shutdownCompleted(AutorecoveringConnection.java:383)
        at com.rabbitmq.client.impl.ShutdownNotifierComponent.notifyListeners(ShutdownNotifierComponent.java:75)
        at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:578)
        at java.lang.Thread.run(Thread.java:745)
Caused by: com.rabbitmq.client.AlreadyClosedException: channel is already closed due to clean channel shutdown; protocol method: #method<channel.close>(reply-code=200, reply-text=OK, class-id=0, method-id=0)
        at com.rabbitmq.client.impl.AMQChannel.ensureIsOpen(AMQChannel.java:195)
        at com.rabbitmq.client.impl.AMQChannel.rpc(AMQChannel.java:241)
        at com.rabbitmq.client.impl.AMQChannel.privateRpc(AMQChannel.java:219)
        at com.rabbitmq.client.impl.AMQChannel.exnWrappingRpc(AMQChannel.java:118)
        at com.rabbitmq.client.impl.ChannelN.queueDeclare(ChannelN.java:844)
        at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.queueDeclare(AutorecoveringChannel.java:266)
        at com.rabbitmq.client.impl.recovery.RecordedQueue.recover(RecordedQueue.java:38)
        at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.recoverQueues(AutorecoveringConnection.java:549)
        ... 7 more
LGLO commented 8 years ago

This should be fixed by #36 AFAIR

vitorsvieira commented 8 years ago

Hi @LGLO !

The bump 1.1.1 contains this fix as well #36?

-V

LGLO commented 8 years ago

No, #36 isn't merged yet.

pocman commented 8 years ago

@notvitor there is similar issue solved in 3.6.1 but 1.1.1 didn't fixed it. Not the same afterall ^^

pocman commented 8 years ago

Now that #36 is merged, could you create a release, I'll give it a try and close the issue if everything is good ;)

matemagyari commented 8 years ago

Hi @LGLO, when is the next release due?

LGLO commented 8 years ago

I've never release this lib before but I'll try to figure out process and I hope release will be soon.

LGLO commented 8 years ago

@matemagyari I've made GH release. I'll make sure it gets to maven but I'm not sure how long will it take.

guizmaii commented 8 years ago

Hi, It seems that the v1.1.2 is not yet released in Maven. Any news ?

mkiedys commented 8 years ago

Released