activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robr <>
Subject messageListener, ASYNC, and threads in "onMessage()"
Date Sun, 15 Apr 2007 13:47:55 GMT

i read the post at :
which suggests an extra thread around the onMessage dispatcher. We have
occaisional issues in the scope of our 3.1 implementation of "onMessage()"
that could be cause by non-thread-safe code on a file Access. These could be
issues that only come up when the broker gets very busy as they affect only
5 - 10% of our message flow. 

I dont completely understand whether there are , in fact , multiple threads
that call onMessage? The javax.jms api says there is only 1.

Other posts suggest that when using listeners and ASYNC that you should be
prepared to have a 2nd onMessage call dispatched before the prior call has
finished. So , your call stak from onMessage should be thread-safe. 

I've decided to review the code and to make sure that we are not throwing
exceptions in the scope of "onMessage" and to protect the obvious objects in
case there is m-thread issue... but i dont really know...

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

View raw message