activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "massive.boisson" <>
Subject Re: sync vs async sends (was Re: AMQ4.0-M2: Explanation for observed low
Date Mon, 12 Jun 2006 18:01:33 GMT

As usual thanks for reply,

"Yes. In a transaction all operations are async - apart from the final

This is why for multiple-operations (like consuming a message and
sending multiple messages on) you should always use a JMS transaction
as its faster. "

So... I am sending 3 messages to persistent queue with jms.useAsyncSend=true
within a transaction and then commiting. Each send opens a new thread.
Commit blocks. The broker still waits for all 3 sends to be completed (and
persisted) before it returns from the commit, right? 

"Yes - the ExceptionListener should hear any exceptions.

I wonder if we could add a neater non-JMS extension to ActiveMQ to
make it easier to be notified asynchonously of which Message objects
could not be sent? I guess we could just use the ExceptionListener and
use a custom type of Exception which contained the Message object?"

Right, so I'd know something is wrong by listening to the ExceptionListener,
but I'd have no way of knowing which message didn't work correctly. 
And thus it would be great to have more detalis within
ActiveMqCustomException which would at least point to the problematic

View this message in context:
Sent from the ActiveMQ - User forum at

View raw message