activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ladlestein <r...@acm.org>
Subject Re: ActiveMQ onMessage() callback not async
Date Sun, 29 Jul 2007 23:25:36 GMT

If you look at the javadocs for 
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/MessageListener.html
MessageListener , you'll see that the Session backing your listener won't
call onMessage while a previous onMessage invocation has yet to return.  I'm
puzzled why they even need to say that, though, because a 
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/jms/Session.html Session 
is a single-threaded context.  If you want concurrent message processing,
you will need multiple threads; using multiple Sessions might be the way to
go.  Someone else with more expertise here could say more.


sparky2708 wrote:
> 
> I am finding that when I receive messages in my java client that I can
> only process one request at a time. It seems like the method:
> onMessage(Message arg) from MessageListener interface doesn't get called
> asynchronously. Do I need to start a thread in this method to get the
> async behavior that I am looking for or am I missing some option when I
> subscribe?
> 

-- 
View this message in context: http://www.nabble.com/ActiveMQ-onMessage%28%29-callback-not-async-tf4160185s2354.html#a11856245
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message