activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From artnaseef <>
Subject Re: asyncSend Mode
Date Tue, 16 Dec 2014 23:52:09 GMT
Async Send can lead to lost messages unless you somehow account for that in
the producer - such as retrying the message periodically until a response is

Async sending does significantly improve performance, especially for
persistent messages, because it eliminates the round-trip to the broker.

You can also use transactions, which under the hood use async sends too. 
Then wait until the commit before assuming the send was successful.  A
couple of caveats: (a) that works as a batch send (i.e. you have to send
multiple messages with a single commit to get the benefit), and (b) there is
a bug in which it is possible (although not too likely) that an error on the
broker will lead to failure of those messages without the client knowing
about it.

Another thing you can try -- use multiple independent producers.  As long as
message order is not an issue.

Note, by the way, that Producer Flow Control never improves performance of
message production - it's a safeguard against slow consumption that keeps
the broker from possibly becoming totally unresponsive by blocking producers
once destinations use too much memory.

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

View raw message