Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore a faulty subscription #138

Open
1van3 opened this issue Apr 19, 2018 · 1 comment
Open

Restore a faulty subscription #138

1van3 opened this issue Apr 19, 2018 · 1 comment

Comments

@1van3
Copy link

1van3 commented Apr 19, 2018

Hello,
a few days ago a colleague of mine has encountered a strange behavior - sometime channel subscription "hangs".

I have tried to investigate an issue and here is my observations:

  1. Subscription "hangs" because default channel Rpc timeout is 10 minutes (see com.rabbitmq.client.ConnectionFactory.DEFAULT_CHANNEL_RPC_TIMEOUT) and there was no ACK on DeclareQueue method from Rabbit side sometimes.
  2. After i have changed DEFAULT_CHANNEL_RPC_TIMEOUT to 1 second (btw there is no way to do it in current version of op-rabbit (see com.spingo.op_rabbit.ConnectionParams)) i was expecting that faulty subscription will recover automatically, but got unhandled TimeoutException (probably for the same reason - because Rabbit hasn't ACKed Close message)
    java.util.concurrent.TimeoutException
    at com.rabbitmq.utility.BlockingCell.get(BlockingCell.java:77)
    at com.rabbitmq.utility.BlockingCell.uninterruptibleGet(BlockingCell.java:120)
    at com.rabbitmq.utility.BlockingValueOrException.uninterruptibleGetValue(BlockingValueOrException.java:36)
    at com.rabbitmq.client.impl.AMQChannel$BlockingRpcContinuation.getReply(AMQChannel.java:494)
    at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:604)
    at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:529)
    at com.rabbitmq.client.impl.ChannelN.close(ChannelN.java:522)
    at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.newmotion.akka.rabbitmq.RabbitMqActor$class.closeIfOpen(RabbitMqActor.scala:27)
    at com.newmotion.akka.rabbitmq.ChannelActor.closeIfOpen(ChannelActor.scala:29)

Guys, can you suggest, what should i do in such case?
Should i try to kill subscription/rabbit control or restore should be performed on op-rabbit side?
If it should be done on my side please suggest how to correctly stop subscription.

@timcharper
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants