activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Davies <rajdav...@gmail.com>
Subject Re: Network bridge drops connection after 40 seconds
Date Wed, 03 Dec 2008 11:27:51 GMT

On 2 Dec 2008, at 12:03, Vedran Vrbanc wrote:

>
> THE PROBLEM
> ----------------
>
> The following scenario demonstrates the problem:
>
> - broker A has a network connector to broker B.
>
> - producer is connected to A, consumer is connected to B
>
> - network connection between A and B is relatively slow (e.g. 64kbit)
>
> If the producer publishes a durable message so large that its  
> transfer will
> last more than 40 seconds, the receiving broker B will send a TCP  
> RST and
> drop the conenction. On the broker A, the following is logged:
>
> 008-12-02 07:01:43,205 [://brokera#0] WARN   
> DemandForwardingBridge         -
> Caught an exception processing local command
> java.net.SocketException: Broken pipe
>        at java.net.SocketOutputStream.socketWrite0(Native Method)
>        at
> java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
> etc.
>
>
> This will occur only when sending of a single message lasts longer  
> than 40
> seconds. When the connection drops, the broker tries to re-send but  
> it never
> does since the bridge drops every 40 seconds.
>
> Tested with AMQ 5.1.0 and 5.2.0 on linux-32 and macosx.
>
> THE SOLUTION
> -----------------
>
> the maxInactivityTimeout property should be set to 0, like so:
>
> <networkConnector name="brokerb"
> uri="static://(tcp://brokerb:61616? 
> wireFormat.maxInactivityDuration=0)" />
>
>
>
> -- 
> View this message in context: http://www.nabble.com/Network-bridge-drops-connection-after-40-seconds-tp20790793p20790793.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>

I added this to the FAQ btw - http://activemq.apache.org/slow-networks-drop-large-messages.html

cheers,

Rob

Rob Davies
http://fusesource.com
http://rajdavies.blogspot.com/







Mime
View raw message