qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Ritchie <ritch...@apache.org>
Subject Re: Clarification on JMS Client behaviour w.r.t message listeners
Date Wed, 18 Feb 2009 13:33:47 GMT
Rajith,
Do you have a test case that shows the dispatcher not starting on the
setting of a message listener after connection start?

The reason we don't automatically start is that if we create a
consumer on a session and never consume on it then starting the
dispatcher will fill the prefetch on that consumer.

This is something that Mule does so we ensure that all sessions are
started flowed and only unflow when a consumer actually attempts to
consume via consume() or setMessageListener().

While this may mean a delay in receiving the first message it ensures
that Mule users actually get all the messages on a queue.

With the  0-10 code path I note that it attempts to reject all
messages in the _synchronousQueue, but it does this after calling
super.setMessageListener() which delivers all the messages in
_synchronousQueue.

Why does the 0-10 path attempt to reject messages?

Is there a case where the dispatcher may sneak an extra message in to
the _synchronusQueue after the first delivery purge in
AMQSession.setMessageListener()?

If so then this would affect 0-8 and should be addressed at a different level.

Cheers

Martin

2009/2/18 Aidan Skinner <aidan.skinner@gmail.com>:
> On Tue, Feb 17, 2009 at 10:43 PM, Rajith Attapattu <rajith77@gmail.com> wrote:
>
>> I noticed in the current codebase,
>> that when the connection is started, the dispatcher thread for a
>> particular session will not be started if there are no registered
>> message listeners.
>> But if I add a message listener later, the dispatcher thread should be
>> started, but apparently it does not seem to be.
>
> That seems odd, and implies that onMessage won't work. I would expect
> DispatcherTest.testAsynchronousRecieve to fail, amongst others in that
> case but they pass for me (running all three profiles). How are you
> testing this?
>
> - Aidan
> --
> Apache Qpid - World Domination through Advanced Message Queueing
> http://qpid.apache.org
>
> ---------------------------------------------------------------------
> Apache Qpid - AMQP Messaging Implementation
> Project:      http://qpid.apache.org
> Use/Interact: mailto:dev-subscribe@qpid.apache.org
>
>



-- 
Martin Ritchie

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


Mime
View raw message