hi.
i use federation plugin and i create upstream from on cp(node1) to another (node2).
important thing for me is that,if internet disconnected,i don't loos any message.
for testing ,i write sample test for publish msg in n ode1 and sample test for consuming in node2.when internet in node1(upstream )disconnected.after 30 min i get this exception in node2(downstream.)
Exception in thread "main" com.rabbitmq.client.ShutdownSignalException: connection error; reason: java.net.SocketException: Connection reset
at com.rabbitmq.client.QueueingConsumer.handle(QueueingConsumer.java:198)
at com.rabbitmq.client.QueueingConsumer.nextDelivery(QueueingConsumer.java:215)
at Consumer.main(Consumer.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:189)
at java.net.SocketInputStream.read(SocketInputStream.java:121)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
at java.io.DataInputStream.readFully(DataInputStream.java:195)
at java.io.DataInputStream.readFully(DataInputStream.java:169)
at com.rabbitmq.client.impl.Frame.readFrom(Frame.java:117)
at com.rabbitmq.client.impl.SocketFrameHandler.readFrame(SocketFrameHandler.java:131)
at com.rabbitmq.client.impl.AMQConnection$MainLoop.run(AMQConnection.java:515)
how can i catch connection reset in my code?
also
log of server is :
=SUPERVISOR REPORT==== 9-Aug-2014::20:20:14 ===
Supervisor: {<0.228.0>,
rabbit_federation_link_sup}
Context: child_terminated
Reason: {shutdown,restart}
Offender: [{pid,<0.231.0>},
{name,
{upstream,
<<"metrics.user_login">>,<<"metrics.user_login">>,
1000,1,1,none,none,false,'on-confirm',none,
<<"sa-upstream">>}},
{mfargs,
{rabbit_federation_exchange_link,start_link,
[{{upstream,
<<"metrics.user_login">>,
<<"metrics.user_login">>,1000,1,1,none,none,
false,'on-confirm',none,<<"sa-upstream">>},
{resource,<<"/">>,exchange,
<<"metrics.user_login">>}}]}},
{restart_type,{permanent,1}},
{shutdown,4294967295},
{child_type,worker}]