How to use autorecover in the RabbitMQ Java Publisher?

1,391 views
Skip to first unread message

Alexandr Porunov

unread,
Oct 10, 2016, 11:14:32 AM10/10/16
to rabbitmq-users
Hello,

I try to recover the connection after node is crashed but without success. 
Here is my code:

int msgCount = 1000000;
String QUEUE_NAME = "queue-test";
ConfirmListener confirmListener = new RabbitMQConfirmListener();
ConnectionFactory connectionFactory = new ConnectionFactory();
connectionFactory.setUsername("admin");
connectionFactory.setPassword("adminpass");
connectionFactory.setRequestedHeartbeat(5);
connectionFactory.setAutomaticRecoveryEnabled(true);
connectionFactory.setTopologyRecoveryEnabled(true);
connectionFactory.setNetworkRecoveryInterval(5000);
connectionFactory.setConnectionTimeout(30000);

Address[] addrArr = new Address[]{ new Address("192.168.0.77", 5672)
                , new Address("192.168.0.78", 5672), new Address("192.168.0.79", 5672)};

ExecutorService es = Executors.newFixedThreadPool(20);
Connection conn = connectionFactory.newConnection(es, addrArr);

Channel ch = conn.createChannel();

ch.addConfirmListener(confirmListener);
ch.queueDeclare(QUEUE_NAME, true, false, false, null);
ch.confirmSelect();

for (long i = 0; i < msgCount; ++i) {
    while (true) {
        try {
            ch.basicPublish("", QUEUE_NAME,
                    MessageProperties.PERSISTENT_BASIC,
                    ("my message").getBytes());
            break;
        } catch (Exception e) {
            System.out.println(e);
            try {
                ch=conn.createChannel();
                ch.addConfirmListener(new RabbitMQConfirmListener(confirmListener));
                ch.queueDeclare(QUEUE_NAME, true, false, false, null);
                ch.confirmSelect();
            } catch (Exception e1) {
                LOG.error("CHANNEL RECOVER ERROR!");
                e1.printStackTrace();
            }
        }
    }
}

The main problem is that after the node failure (to which publisher is connected) this code stucks:
ch.basicPublish("", QUEUE_NAME,
                    MessageProperties.PERSISTENT_BASIC,
                    ("my message").getBytes());

It just stops for infinity and does nothing. I don't see any connections or channels in rabbitmq web management. And application becomes unworkable. I am waiting for 5-10 minutes and nothing changes. I don't see any exceptions because "try" block never throws any exceptions. It just stucks when ch.basicPublish is invoked. 

The strange thing is that if I don't push any messages (don't use "ch.basicPublish") then I do see the new connection and the new channel in the rabbitmq web management. So, it recovers a connection to the new node and creates a new channel. But if I use ch.basicPublish before it recover a connection then I just get stuck and that is all.

Is it possible somehow safely publish new messages to the channel? So that if our node is broken then I will get a new Exception (like Channel is closed or something like that) and then safely reconnect to the new node and continue to work?

Also, does Spring AMQP has these problems or it can better reconnect / recover?

Sincerely,
Alexandr

Arnaud Cogoluegnes

unread,
Oct 10, 2016, 11:37:46 AM10/10/16
to rabbitm...@googlegroups.com
Could you take a thread dump when your program is stuck?


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-users+unsubscribe@googlegroups.com.
To post to this group, send email to rabbitmq-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alexandr Porunov

unread,
Oct 10, 2016, 11:56:41 AM10/10/16
to rabbitmq-users
Yes. Also, I want to mention that if I start my broken node and it joins the cluster again then my program starts work again. After failed node is running again I get an exception and recover my channel. But if node dies forever then application gets stuck forever too..

Here it is:
2016-10-10 18:51:12
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode):

"Attach Listener" #46 daemon prio=9 os_prio=0 tid=0x00007f1790001000 nid=0x2515 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"DestroyJavaVM" #45 prio=5 os_prio=0 tid=0x00007f17dc009800 nid=0x2282 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"http-nio-8080-AsyncTimeout" #43 daemon prio=5 os_prio=0 tid=0x00007f17ddeb8000 nid=0x22ae waiting on condition [0x00007f1742840000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.coyote.AbstractProtocol$AsyncTimeout.run(AbstractProtocol.java:1120)
at java.lang.Thread.run(Thread.java:745)

"http-nio-8080-Acceptor-0" #42 daemon prio=5 os_prio=0 tid=0x00007f17ddeb6800 nid=0x22ad runnable [0x00007f1742941000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.ServerSocketChannelImpl.accept0(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:422)
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:250)
- locked <0x00000000f593e3e0> (a java.lang.Object)
at org.apache.tomcat.util.net.NioEndpoint$Acceptor.run(NioEndpoint.java:457)
at java.lang.Thread.run(Thread.java:745)

"http-nio-8080-ClientPoller-1" #41 daemon prio=5 os_prio=0 tid=0x00007f17ddb84800 nid=0x22ac runnable [0x00007f1742a42000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000000f593eb88> (a sun.nio.ch.Util$2)
- locked <0x00000000f593eb78> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000f593ea40> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:791)
at java.lang.Thread.run(Thread.java:745)

"http-nio-8080-ClientPoller-0" #40 daemon prio=5 os_prio=0 tid=0x00007f17dfde7000 nid=0x22ab runnable [0x00007f1742b43000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000000f593f150> (a sun.nio.ch.Util$2)
- locked <0x00000000f593f140> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000f593f008> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at org.apache.tomcat.util.net.NioEndpoint$Poller.run(NioEndpoint.java:791)
at java.lang.Thread.run(Thread.java:745)

"NioBlockingSelector.BlockPoller-1" #39 daemon prio=5 os_prio=0 tid=0x00007f17dcf7b800 nid=0x22aa runnable [0x00007f176c14a000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x00000000f593fa68> (a sun.nio.ch.Util$2)
- locked <0x00000000f593fa58> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000f593f930> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at org.apache.tomcat.util.net.NioBlockingSelector$BlockPoller.run(NioBlockingSelector.java:339)

"cluster1-nio-worker-2" #22 prio=5 os_prio=0 tid=0x00007f17de913800 nid=0x22a9 runnable [0x00007f176c44b000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x0000000085f646d8> (a io.netty.channel.nio.SelectedSelectionKeySet)
- locked <0x0000000085f66758> (a java.util.Collections$UnmodifiableSet)
- locked <0x0000000085f64640> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:685)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:345)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:745)

"cluster1-nio-worker-1" #21 prio=5 os_prio=0 tid=0x00007f17dc557000 nid=0x22a8 runnable [0x00007f176d74d000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x0000000085f66f40> (a io.netty.channel.nio.SelectedSelectionKeySet)
- locked <0x0000000085fa0fe0> (a java.util.Collections$UnmodifiableSet)
- locked <0x0000000085f66ea8> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:685)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:345)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:745)

"threadDeathWatcher-2-1" #38 daemon prio=1 os_prio=0 tid=0x00007f174c573000 nid=0x22a7 waiting on condition [0x00007f176e84f000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at io.netty.util.ThreadDeathWatcher$Watcher.run(ThreadDeathWatcher.java:147)
at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:145)
at java.lang.Thread.run(Thread.java:745)

"cluster1-timeouter-0" #36 prio=5 os_prio=0 tid=0x00007f174c417000 nid=0x22a6 waiting on condition [0x00007f176e950000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at io.netty.util.HashedWheelTimer$Worker.waitForNextTick(HashedWheelTimer.java:461)
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:360)
at java.lang.Thread.run(Thread.java:745)

"cluster1-nio-worker-0" #20 prio=5 os_prio=0 tid=0x00007f17dc936800 nid=0x22a5 runnable [0x00007f176ea51000]
   java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(EPollArrayWrapper.java:269)
at sun.nio.ch.EPollSelectorImpl.doSelect(EPollSelectorImpl.java:79)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
- locked <0x0000000085fa17c8> (a io.netty.channel.nio.SelectedSelectionKeySet)
- locked <0x0000000085fa3848> (a java.util.Collections$UnmodifiableSet)
- locked <0x0000000085fa1730> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
at io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:685)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:345)
at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:112)
at java.lang.Thread.run(Thread.java:745)

"cluster1-scheduled-task-worker-0" #37 prio=5 os_prio=0 tid=0x00007f17dfbaa800 nid=0x22a4 waiting on condition [0x00007f176ed52000]
   java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x0000000085e4d600> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"cluster1-connection-reaper-0" #19 prio=5 os_prio=0 tid=0x00007f17ddf88800 nid=0x22a3 waiting on condition [0x00007f176f053000]
   java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for  <0x0000000085e4dc78> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093)
at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809)
at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1067)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1127)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"container-0" #18 prio=5 os_prio=0 tid=0x00007f17dc5aa000 nid=0x22a2 waiting on condition [0x00007f176f566000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.core.StandardServer.await(StandardServer.java:427)
at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainer$1.run(TomcatEmbeddedServletContainer.java:167)

"ContainerBackgroundProcessor[StandardEngine[Tomcat].StandardHost[localhost].StandardContext[]]" #17 daemon prio=5 os_prio=0 tid=0x00007f17644ad800 nid=0x22a1 waiting on condition [0x00007f176f667000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
at java.lang.Thread.sleep(Native Method)
at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1339)
at java.lang.Thread.run(Thread.java:745)

"Thread-1" #13 prio=5 os_prio=0 tid=0x00007f17dc7ec800 nid=0x2297 runnable [0x00007f17a503c000]
   java.lang.Thread.State: RUNNABLE
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
- locked <0x0000000084b8f648> (a java.io.BufferedOutputStream)
at java.io.DataOutputStream.flush(DataOutputStream.java:123)
at com.rabbitmq.client.impl.SocketFrameHandler.flush(SocketFrameHandler.java:149)
at com.rabbitmq.client.impl.AMQConnection.flush(AMQConnection.java:521)
at com.rabbitmq.client.impl.AMQCommand.transmit(AMQCommand.java:124)
at com.rabbitmq.client.impl.AMQChannel.quiescingTransmit(AMQChannel.java:333)
- locked <0x0000000084ba30d0> (a java.lang.Object)
at com.rabbitmq.client.impl.AMQChannel.transmit(AMQChannel.java:309)
- locked <0x0000000084ba30d0> (a java.lang.Object)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:656)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:639)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:630)
at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.basicPublish(AutorecoveringChannel.java:183)
at com.fyfine.loader.Application$Publisher.run(Application.java:112)
at java.lang.Thread.run(Thread.java:745)

"pool-1-thread-2" #12 prio=5 os_prio=0 tid=0x00007f17dc661800 nid=0x2296 waiting for monitor entry [0x00007f17a513d000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:94)
- waiting to lock <0x0000000084b8f648> (a java.io.BufferedOutputStream)
at java.io.DataOutputStream.writeByte(DataOutputStream.java:153)
at com.rabbitmq.client.impl.Frame.writeTo(Frame.java:188)
at com.rabbitmq.client.impl.SocketFrameHandler.writeFrame(SocketFrameHandler.java:144)
- locked <0x0000000084b8f628> (a java.io.DataOutputStream)
at com.rabbitmq.client.impl.HeartbeatSender$HeartbeatRunnable.run(HeartbeatSender.java:138)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"AMQP Connection 192.168.0.79:5672" #11 prio=5 os_prio=0 tid=0x00007f17dc2ff000 nid=0x2295 waiting for monitor entry [0x00007f17a523e000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at com.rabbitmq.client.impl.AMQChannel.processShutdownSignal(AMQChannel.java:280)
- waiting to lock <0x0000000084ba30d0> (a java.lang.Object)
at com.rabbitmq.client.impl.ChannelN.startProcessShutdownSignal(ChannelN.java:266)
at com.rabbitmq.client.impl.ChannelN.processShutdownSignal(ChannelN.java:290)
at com.rabbitmq.client.impl.ChannelManager.handleSignal(ChannelManager.java:97)
at com.rabbitmq.client.impl.AMQConnection.finishShutdown(AMQConnection.java:760)
at com.rabbitmq.client.impl.AMQConnection.shutdown(AMQConnection.java:733)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:576)
at java.lang.Thread.run(Thread.java:745)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00007f17dc22b800 nid=0x2293 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread3" #8 daemon prio=9 os_prio=0 tid=0x00007f17dc20e800 nid=0x2292 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #7 daemon prio=9 os_prio=0 tid=0x00007f17dc20c000 nid=0x2291 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007f17dc20a800 nid=0x2290 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007f17dc207800 nid=0x228f waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007f17dc206000 nid=0x228e runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007f17dc1ce000 nid=0x228d in Object.wait() [0x00007f17a60e7000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000084afc0e8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked <0x0000000084afc0e8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007f17dc1cc000 nid=0x228c in Object.wait() [0x00007f17a61e8000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000084af0f60> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
- locked <0x0000000084af0f60> (a java.lang.ref.Reference$Lock)

"VM Thread" os_prio=0 tid=0x00007f17dc1c6800 nid=0x228b runnable 

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007f17dc01f000 nid=0x2283 runnable 

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007f17dc020800 nid=0x2284 runnable 

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00007f17dc022800 nid=0x2285 runnable 

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00007f17dc024000 nid=0x2286 runnable 

"GC task thread#4 (ParallelGC)" os_prio=0 tid=0x00007f17dc026000 nid=0x2287 runnable 

"GC task thread#5 (ParallelGC)" os_prio=0 tid=0x00007f17dc027800 nid=0x2288 runnable 

"GC task thread#6 (ParallelGC)" os_prio=0 tid=0x00007f17dc029800 nid=0x2289 runnable 

"GC task thread#7 (ParallelGC)" os_prio=0 tid=0x00007f17dc02b000 nid=0x228a runnable 

"VM Periodic Task Thread" os_prio=0 tid=0x00007f17dc236800 nid=0x2294 waiting on condition 

JNI global references: 269

Arnaud Cogoluegnes

unread,
Oct 10, 2016, 12:17:34 PM10/10/16
to rabbitm...@googlegroups.com
It looks like you're hitting a problem that has been fixed by a recent PR [1].

The PR has been merged in the 4.0 branch (master), so you'll have to compile the client yourself.

You need to set the shutdown executor at the connection factory level. You can also lower the heartbeat (~ 10 seconds) to see results quickly.



Alexandr Porunov

unread,
Oct 10, 2016, 2:07:59 PM10/10/16
to rabbitmq-users
I can't compile unfortunately.

Here is an error from maven:

$mvn compile

[INFO] Scanning for projects...
[INFO] Inspecting build with total of 1 modules...
[INFO] Installing Nexus Staging features:
[INFO]   ... total of 1 executions of maven-deploy-plugin replaced with nexus-staging-maven-plugin
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building RabbitMQ Java Client 4.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- groovy-maven-plugin:2.0:execute (generate-amqp-sources) @ amqp-client ---
Traceback (most recent call last):
  File "/home/alex/Downloads/rabbitmq-java-client-master/codegen.py", line 24, in <module>
    from amqp_codegen import *
ImportError: No module named amqp_codegen
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.843s
[INFO] Finished at: Mon Oct 10 21:05:32 EEST 2016
[INFO] Final Memory: 14M/195M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute (generate-amqp-sources) on project amqp-client: Execution generate-amqp-sources of goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute failed: org.apache.maven.plugin.MojoExecutionException: Failed to generate /home/alex/Downloads/rabbitmq-java-client-master/target/generated-sources/src/main/java/com/rabbitmq/client/AMQP.java with command: python /home/alex/Downloads/rabbitmq-java-client-master/codegen.py header /home/alex/Downloads/rabbitmq-java-client-master/deps/rabbitmq_codegen/amqp-rabbitmq-0.9.1.json /home/alex/Downloads/rabbitmq-java-client-master/target/generated-sources/src/main/java/com/rabbitmq/client/AMQP.java -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:

Arnaud Cogoluegnes

unread,
Oct 10, 2016, 2:45:06 PM10/10/16
to rabbitm...@googlegroups.com
You need to clone the umbrella, please see instructions here: https://github.com/rabbitmq/rabbitmq-java-client/blob/master/CONTRIBUTING.md

--

Alexandr Porunov

unread,
Oct 10, 2016, 2:47:57 PM10/10/16
to rabbitmq-users
Also, I want to noticed that I ran my code one more time and after 27 minutes of the unresponsive state (when it wait for nothing) it started work. It reconnected to the new node and recreated a channel. Do you know when the new release or fixes will be available?

Michael Klishin

unread,
Oct 10, 2016, 3:45:39 PM10/10/16
to rabbitm...@googlegroups.com
We can release a 4.0 milestone some time this week.

On 10 Oct 2016, at 21:47, Alexandr Porunov <alexandr...@gmail.com> wrote:

Also, I want to noticed that I ran my code one more time and after 27 minutes of the unresponsive state (when it wait for nothing) it started work. It reconnected to the new node and recreated a channel. Do you know when the new release or fixes will be available?

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.

Alexandr Porunov

unread,
Oct 10, 2016, 4:42:55 PM10/10/16
to rabbitmq-users
It would be great. I am looking forward to it.

Arnaud Cogoluegnes

unread,
Oct 11, 2016, 2:43:28 AM10/11/16
to rabbitm...@googlegroups.com
The unresponsive state shouldn't last that long. Did you lower the heartbeat interval and set the shutdown executor? It should be like the following:

connectionFactory.setRequestedHeartbeat(5);
ExecutorService shutdownExecutor = Executors.newSingleThreadExecutor();
connectionFactory.setShutdownExecutor(shutdownExecutor);

On Mon, Oct 10, 2016 at 8:47 PM, Alexandr Porunov <alexandr...@gmail.com> wrote:
Also, I want to noticed that I ran my code one more time and after 27 minutes of the unresponsive state (when it wait for nothing) it started work. It reconnected to the new node and recreated a channel. Do you know when the new release or fixes will be available?

--

Alexandr Porunov

unread,
Oct 11, 2016, 9:47:55 AM10/11/16
to rabbitmq-users
Yes. I did all those stuff.

The situation is next:
When the node is crashed and we don't send messages with:

ch.basicPublish("", QUEUE_NAME,
                    MessageProperties.PERSISTENT_BASIC,
                    ("my message").getBytes());

then connection reconnects normally.

But if we try to send a message when the node is crashed but the connection isn't reconnected then we will get stuck for very long time (and won't be connected to the new node for very long time too). 
connectionFactory.setRequestedHeartbeat(5); doesn't work in this case

Arnaud Cogoluegnes

unread,
Oct 11, 2016, 10:27:06 AM10/11/16
to rabbitm...@googlegroups.com
Sorry to insist, but the lines that really matter if you give a try to the Java client 4.0 are:
ExecutorService shutdownExecutor = Executors.newSingleThreadExecutor();
connectionFactory.setShutdownExecutor(shutdownExecutor);

Please ensure you added them before creating the connection, the low value for the heartbeat isn't enough.

Moreover, according to the thread dump, you're running in a web container. Try to reproduce the problem in a standalone program to minimize noise from other applications and post the new thread dump.

Thanks.

--

Alexandr Porunov

unread,
Oct 11, 2016, 2:03:52 PM10/11/16
to rabbitmq-users
I tried to run it with Java client 3.6.5 and it doesn't work. Unfortunately I have problems with compilation of 4.0.0. version.. If you could send me somehow compiled client 4.0.0 I would have tested it.

The full creation of the connection I used is the next: 
connectionFactory = new ConnectionFactory();
connectionFactory.setUsername("admin");
connectionFactory.setPassword("adminpass");
connectionFactory.setRequestedHeartbeat(5);
connectionFactory.setAutomaticRecoveryEnabled(true);
connectionFactory.setTopologyRecoveryEnabled(true);
connectionFactory.setNetworkRecoveryInterval(5000);
 connectionFactory.setConnectionTimeout(10000);
ExecutorService shutdownExecutor = Executors.newSingleThreadExecutor();
connectionFactory.setShutdownExecutor(shutdownExecutor);
Address[] addrArr = new Address[]{ new Address("192.168.0.77", 5672)

, new Address("192.168.0.78", 5672), new Address("192.168.0.79", 5672)};
ExecutorService es = Executors.newFixedThreadPool(20);
conn = connectionFactory.newConnection(es, addrArr);
Channel ch = conn.createChannel();

ch.queueDeclare(QUEUE_NAME, true, false, false, null);
ch.addConfirmListener(new RabbitMQConfirmListener(unconfirmedMessagesMap));
ch.confirmSelect();

Arnaud Cogoluegnes

unread,
Oct 12, 2016, 8:00:50 AM10/12/16
to rabbitm...@googlegroups.com
We released the Java Client 4.0.0.M1, you can give it a try.

--

Alexandr Porunov

unread,
Oct 12, 2016, 12:23:33 PM10/12/16
to rabbitmq-users
I still can compile it. Could you help me please?
I use "make" then I use "mvn package". "make" has successfully done but "mvn package" shows next errors:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building RabbitMQ Java Client 4.0.0.M1
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- groovy-maven-plugin:2.0:execute (generate-amqp-sources) @ amqp-client ---
[INFO] 
[INFO] --- build-helper-maven-plugin:1.12:add-source (add-generated-sources-dir) @ amqp-client ---
[INFO] Source directory: /home/alex/Downloads/rabbitmq-java-client-4.0.0.M1/target/generated-sources/src/main/java added.
[INFO] 
[INFO] --- maven-resources-plugin:3.0.1:resources (default-resources) @ amqp-client ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ amqp-client ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-bundle-plugin:2.3.7:manifest (bundle-manifest) @ amqp-client ---
[INFO] 
[INFO] --- groovy-maven-plugin:2.0:execute (remove-old-test-keystores) @ amqp-client ---
[INFO] 
[INFO] --- groovy-maven-plugin:2.0:execute (query-test-tls-certs-dir) @ amqp-client ---
make: erl: Command not foundmake: erl: Command not found GEN    /tmp/rabbitmq-test-instances/tls-certsmake[1]: *** /home/alex/Downloads/rabbitmq-java-client-4.0.0.M1/deps/rabbitmq_ct_helpers/tools/tls-certs: No such file or directory.  Stop./home/alex/Downloads/rabbitmq-java-client-4.0.0.M1/deps/rabbit_common/mk/rabbitmq-run.mk:190: recipe for target '/tmp/rabbitmq-test-instances/tls-certs' failedmake: *** [/tmp/rabbitmq-test-instances/tls-certs] Error 2
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.612s
[INFO] Finished at: Wed Oct 12 19:21:54 EEST 2016
[INFO] Final Memory: 18M/197M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute (query-test-tls-certs-dir) on project amqp-client: Execution query-test-tls-certs-dir of goal org.codehaus.gmaven:groovy-maven-plugin:2.0:execute failed: org.apache.maven.plugin.MojoExecutionException: Failed to query test TLS certs directory with command: make -C /home/alex/Downloads/rabbitmq-java-client-4.0.0.M1/deps/rabbit --no-print-directory show-test-tls-certs-dir DEPS_DIR=/home/alex/Downloads/rabbitmq-java-client-4.0.0.M1/deps -> [Help 1]

Alexandr Porunov

unread,
Oct 12, 2016, 12:40:13 PM10/12/16
to rabbitmq-users
Also I tried to use ant:

cd rabbitmq-java-client
ant dist

It shows:
Buildfile: build.xml does not exist!
Build failed

Arnaud Cogoluegnes

unread,
Oct 12, 2016, 2:18:07 PM10/12/16
to rabbitm...@googlegroups.com
You don't have to compile it, it's on our Bintray Milestones repo, see today's announce.

--

Alexandr Porunov

unread,
Oct 12, 2016, 3:27:24 PM10/12/16
to rabbitmq-users
Now I see an error from the logger but I still don't get an exception when I use:
ch.basicPublish("", QUEUE_NAME,
                                MessageProperties.PERSISTENT_BASIC,
                                (i + "_nop").getBytes());

It gets stuck and I don't know what to do..

I see in the console the next message:
22:08:38.556 [AMQP Connection 192.168.0.78:5672] ERROR c.r.c.i.ForgivingExceptionHandler - An unexpected connection driver error occured
com.rabbitmq.client.MissedHeartbeatException: Heartbeat missing with heartbeat = 5 seconds
        at com.rabbitmq.client.impl.AMQConnection.handleSocketTimeout(AMQConnection.java:719)
        at com.rabbitmq.client.impl.AMQConnection.readFrame(AMQConnection.java:638)
        at com.rabbitmq.client.impl.AMQConnection.access$300(AMQConnection.java:47)
        at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:568)
        at java.lang.Thread.run(Thread.java:745)

But, it gets stuck still.

You should try to reproduce this error.

Just run in the loop a message publishing with the:
ch.basicPublish("", QUEUE_NAME,
                                MessageProperties.PERSISTENT_BASIC,
                                (i + "_nop").getBytes());

And set a heartbeat for around 5 seconds. After that just shutdown one of your cluster's node. I am almost sure that you will see the same thing. Your connection won't automatically reconnect and your ch.basicPublish won't throw any exceptions it just will stuck. If we don't use ch.basicPublish in the range between the node has crashed and the node automatically is reconnected then all is OK but if you do then something strange happens. I used the same code as above.

Here is my thread dump:

2016-10-12 22:25:12
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.60-b23 mixed mode):

"Attach Listener" #15 daemon prio=9 os_prio=0 tid=0x00007fe580001000 nid=0x18a waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"DestroyJavaVM" #14 prio=5 os_prio=0 tid=0x00007fe5c8009800 nid=0x7c90 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Thread-1" #13 prio=5 os_prio=0 tid=0x00007fe5c8c19000 nid=0x7ca5 runnable [0x00007fe587054000]
   java.lang.Thread.State: RUNNABLE
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
- locked <0x0000000084a3ddb0> (a java.io.BufferedOutputStream)
at java.io.DataOutputStream.flush(DataOutputStream.java:123)
at com.rabbitmq.client.impl.SocketFrameHandler.flush(SocketFrameHandler.java:177)
at com.rabbitmq.client.impl.AMQConnection.flush(AMQConnection.java:546)
at com.rabbitmq.client.impl.AMQCommand.transmit(AMQCommand.java:127)
at com.rabbitmq.client.impl.AMQChannel.quiescingTransmit(AMQChannel.java:337)
- locked <0x0000000084a1e920> (a java.lang.Object)
at com.rabbitmq.client.impl.AMQChannel.transmit(AMQChannel.java:313)
- locked <0x0000000084a1e920> (a java.lang.Object)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:686)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:668)
at com.rabbitmq.client.impl.ChannelN.basicPublish(ChannelN.java:658)
at com.rabbitmq.client.impl.recovery.AutorecoveringChannel.basicPublish(AutorecoveringChannel.java:188)
at com.fyfine.loader.Application$Publisher.run(Application.java:181)
at java.lang.Thread.run(Thread.java:745)

"pool-1-thread-2" #12 prio=5 os_prio=0 tid=0x00007fe5c8778800 nid=0x7ca4 waiting for monitor entry [0x00007fe587155000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:94)
- waiting to lock <0x0000000084a3ddb0> (a java.io.BufferedOutputStream)
at java.io.DataOutputStream.writeByte(DataOutputStream.java:153)
at com.rabbitmq.client.impl.Frame.writeTo(Frame.java:185)
at com.rabbitmq.client.impl.SocketFrameHandler.writeFrame(SocketFrameHandler.java:171)
- locked <0x0000000084a3dd90> (a java.io.DataOutputStream)
at com.rabbitmq.client.impl.HeartbeatSender$HeartbeatRunnable.run(HeartbeatSender.java:139)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)

"AMQP Connection 192.168.0.78:5672" #11 prio=5 os_prio=0 tid=0x00007fe5c8b44800 nid=0x7ca3 waiting for monitor entry [0x00007fe587256000]
   java.lang.Thread.State: BLOCKED (on object monitor)
at com.rabbitmq.client.impl.AMQChannel.processShutdownSignal(AMQChannel.java:284)
- waiting to lock <0x0000000084a1e920> (a java.lang.Object)
at com.rabbitmq.client.impl.ChannelN.startProcessShutdownSignal(ChannelN.java:282)
at com.rabbitmq.client.impl.ChannelN.processShutdownSignal(ChannelN.java:306)
at com.rabbitmq.client.impl.ChannelManager$1.run(ChannelManager.java:117)
at com.rabbitmq.client.impl.ChannelManager.handleSignal(ChannelManager.java:121)
at com.rabbitmq.client.impl.AMQConnection.finishShutdown(AMQConnection.java:875)
at com.rabbitmq.client.impl.AMQConnection.shutdown(AMQConnection.java:848)
at com.rabbitmq.client.impl.AMQConnection.handleFailure(AMQConnection.java:670)
at com.rabbitmq.client.impl.AMQConnection.access$400(AMQConnection.java:47)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:571)
at java.lang.Thread.run(Thread.java:745)

"Service Thread" #9 daemon prio=9 os_prio=0 tid=0x00007fe5c821b800 nid=0x7ca1 runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C1 CompilerThread3" #8 daemon prio=9 os_prio=0 tid=0x00007fe5c820e800 nid=0x7ca0 waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread2" #7 daemon prio=9 os_prio=0 tid=0x00007fe5c820c000 nid=0x7c9f waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread1" #6 daemon prio=9 os_prio=0 tid=0x00007fe5c820a800 nid=0x7c9e waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"C2 CompilerThread0" #5 daemon prio=9 os_prio=0 tid=0x00007fe5c8207800 nid=0x7c9d waiting on condition [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Signal Dispatcher" #4 daemon prio=9 os_prio=0 tid=0x00007fe5c8206000 nid=0x7c9c runnable [0x0000000000000000]
   java.lang.Thread.State: RUNNABLE

"Finalizer" #3 daemon prio=8 os_prio=0 tid=0x00007fe5c81ce000 nid=0x7c9b in Object.wait() [0x00007fe59414d000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000084a1b6c8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)
- locked <0x0000000084a1b6c8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:164)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:209)

"Reference Handler" #2 daemon prio=10 os_prio=0 tid=0x00007fe5c81cc000 nid=0x7c9a in Object.wait() [0x00007fe59424e000]
   java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x0000000084a1b8e0> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:502)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:157)
- locked <0x0000000084a1b8e0> (a java.lang.ref.Reference$Lock)

"VM Thread" os_prio=0 tid=0x00007fe5c81c6800 nid=0x7c99 runnable 

"GC task thread#0 (ParallelGC)" os_prio=0 tid=0x00007fe5c801f000 nid=0x7c91 runnable 

"GC task thread#1 (ParallelGC)" os_prio=0 tid=0x00007fe5c8020800 nid=0x7c92 runnable 

"GC task thread#2 (ParallelGC)" os_prio=0 tid=0x00007fe5c8022800 nid=0x7c93 runnable 

"GC task thread#3 (ParallelGC)" os_prio=0 tid=0x00007fe5c8024000 nid=0x7c94 runnable 

"GC task thread#4 (ParallelGC)" os_prio=0 tid=0x00007fe5c8026000 nid=0x7c95 runnable 

"GC task thread#5 (ParallelGC)" os_prio=0 tid=0x00007fe5c8027800 nid=0x7c96 runnable 

"GC task thread#6 (ParallelGC)" os_prio=0 tid=0x00007fe5c8029800 nid=0x7c97 runnable 

"GC task thread#7 (ParallelGC)" os_prio=0 tid=0x00007fe5c802b000 nid=0x7c98 runnable 

"VM Periodic Task Thread" os_prio=0 tid=0x00007fe5c821e800 nid=0x7ca2 waiting on condition 

JNI global references: 59


Alexandr Porunov

unread,
Oct 12, 2016, 3:34:01 PM10/12/16
to rabbitmq-users
I have marked it.
After 20 minutes (+- 1 minute) it have been successfully reconnected. ch.basicPublish throwed me next exception:
com.rabbitmq.client.AlreadyClosedException: connection is already closed due to connection error; cause: com.rabbitmq.client.MissedHeartbeatException: Heartbeat missing with heartbeat = 5 seconds
        at com.rabbitmq.client.impl.AMQConnection.ensureIsOpen(AMQConnection.java:168)
        at com.rabbitmq.client.impl.AMQConnection.createChannel(AMQConnection.java:526)
        at com.rabbitmq.client.impl.recovery.AutorecoveringConnection.createChannel(AutorecoveringConnection.java:117)
        at com.fyfine.loader.Application$Publisher.run(Application.java:194)
        at java.lang.Thread.run(Thread.java:745)

And after several tries with the same error it was reconnected. Why it takes so long time?

Arnaud Cogoluegnes

unread,
Oct 13, 2016, 5:30:21 AM10/13/16
to rabbitm...@googlegroups.com
I think you're running into the same problem mentioned in a previous discussion [1], hence the long timeout. It has been fixed in a PR [2], but the fix wasn't propagated correctly when automatic recovery is enabled. I fixed it on master.

You can get the source from Github and run 'mvn clean package -DskipTests' to create the JAR (no need to run the tests, it was the reason the build was failing). If the build still doesn't work, grab the snapshot I uploaded [3].


--

Alexandr Porunov

unread,
Oct 13, 2016, 6:03:14 AM10/13/16
to rabbitmq-users
Thank you very much!
Now it works perfectly!! If the node is crashed then I get an exception after heartbeat time. Connection automatically reconnects to the new node and a new channel successfully creates!

Best Regards,
Alexandr

Arnaud Cogoluegnes

unread,
Oct 13, 2016, 8:04:08 AM10/13/16
to rabbitm...@googlegroups.com
OK, glad to hear that. We'll release a new milestone soon.

--
Reply all
Reply to author
Forward
0 new messages