activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hiram Chirino" <>
Subject Re: Async Message Defaults
Date Mon, 07 Jan 2008 20:56:00 GMT
I'll have to review that the async send property in the .NET stuff is
exactly the same as the java stuff but the idea is this:

 - Async sends are faster since you don't have to wait for a 'broker
ack/receipt' that confirms that the broker has received the message
and it will not be lost.
- Async sends are subject to message loss since depending on the size
of the message and size of the OS TCP buffers you might have several
messages 'sent' from the client perspective that still have not
reached the broker.  If network or client/broker failure occurs those
in flight messages are lost.

Now Async sends are match up perfectly when sending non-persistent
messages since the QoS on a non-persistent message basically says
"yeah, you can drop me if shit happens".  And in the java case we
async send non-persisent messages even if AsyncSend=false.  But if the
message is persistent, it basically says the sending app wants a
guarantee that when the send() method returns the message will not be
dropped.  And we do the send sync with persistent message by default.
Now in the java case if you AsyncSend=true, then even if the message
is persistent then force the async send.  This produces more complex
QoS that basically says you can drop me due to transport failure but
if the message arrives on the broker then the broker will never drop
me even due to broker failure.

On a side note, in the Java case we also send persistent messages
async if they are being sent in a JMS transaction and only send the
final commit command sync.  This works since all commands before the
commit command are processed by the broker before the commit.  And if
any send failed as part of that commit then the commit fails.

Hope that helped...


On Jan 7, 2008 3:41 PM, Jim Gomes <> wrote:
> Hello All,
> I have a question regarding the default settings of the .NET ActiveMQ
> client.  By default, the AsyncSend for the connection is set to false.  I
> would like to change the default to be true, but I would like to know the
> rationale as to why it is currently set to false.  To me, the speed increase
> is tremendous.  My testing shows that sending/receiving 1000 messages over
> the network with AsyncSend set to false takes almost 6 minutes.  If I set
> AsyncSend to true, it takes half a second to do the same thing.  To me, I
> think the default should lean towards speed.  My tests also indicate that it
> is just as reliable as having AsyncSend set to false.
> So, for anyone who might know: is there a reason why the default is set to
> be false, and what are the downsides to changing the default to true?
> Thanks,
> Jim



Open Source SOA

View raw message