activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wiwi <>
Subject Non-blocking send. Proper connection string.
Date Wed, 23 Dec 2015 13:44:04 GMT

Let me explain my issue step by step.

1. First we had the connection string look like this:
Failover re-connection was there.
Send was blocking. if the activemq was not available, the producer got stuck
and we had no control over it.

2. We solved this issue by adding some timeouts to the connection string: 

Why 2 timeouts? No clear documentation about it and we've got this using the
empirical way. Setting just one timeout was giving us blocking send again.
Failover re-connection was there.
Send is not blocking.

The issue came later.
All of a sudden connection listener started to report this: 
Apache.NMS.ActiveMQ.IOException: Oneway timed out after 3000 milliseconds.
   at Apache.NMS.ActiveMQ.Transport.MutexTransport.GetTransmissionLock(Int32
timeout) in
c:\dev\NMS.ActiveMQ\src\main\csharp\Transport\MutexTransport.cs:line 46
   at Apache.NMS.ActiveMQ.Transport.MutexTransport.Oneway(Command command)
in c:\dev\NMS.ActiveMQ\src\main\csharp\Transport\MutexTransport.cs:line 66
   at Apache.NMS.ActiveMQ.Connection.OnKeepAliveCommand(ITransport
commandTransport, KeepAliveInfo info) in
c:\dev\NMS.ActiveMQ\src\main\csharp\Connection.cs:line 1180

After this failover mechanism is broken. Whenever I try to send I receive

Apache.NMS.ActiveMQ.RequestTimedOutException: Synchronous Request Timed out
after [15000] milliseconds
   at Apache.NMS.ActiveMQ.Transport.FutureResponse.get_Response() in
c:\dev\NMS.ActiveMQ\src\main\csharp\Transport\FutureResponse.cs:line 78
   at Apache.NMS.ActiveMQ.Transport.ResponseCorrelator.Request(Command
command, TimeSpan timeout) in
c:\dev\NMS.ActiveMQ\src\main\csharp\Transport\ResponseCorrelator.cs:line 92
   at Apache.NMS.ActiveMQ.Connection.SyncRequest(Command command, TimeSpan
requestTimeout) in c:\dev\NMS.ActiveMQ\src\main\csharp\Connection.cs:line
   at Apache.NMS.ActiveMQ.Session.DoSend(ActiveMQDestination destination,
ActiveMQMessage message, MessageProducer producer, MemoryUsage
producerWindow, TimeSpan sendTimeout) in
c:\dev\NMS.ActiveMQ\src\main\csharp\Session.cs:line 783
   at Apache.NMS.ActiveMQ.MessageProducer.Send(IDestination destination,
IMessage message, MsgDeliveryMode deliveryMode, MsgPriority priority,
TimeSpan timeToLive, Boolean specifiedTimeToLive) in
c:\dev\NMS.ActiveMQ\src\main\csharp\MessageProducer.cs:line 263
   at Apache.NMS.ActiveMQ.MessageProducer.Send(IMessage message) in
c:\dev\NMS.ActiveMQ\src\main\csharp\MessageProducer.cs:line 163

1. Is my understanding correct about the first exception: if I share one
connection with several producers they all will be synced with
MutexTransport and if one of the producers will be slower then 3 seconds,
the rest will fail?
2. Is there cleaner way to do what I want - failover + non-blocking send?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message