This may be due to our design and if so we can tweak to accommodate the
"right" way to solve this problem.

We have a web application that produces messages and throws them on a queue. 
We have a non-web application that runs (from the command line) that
connects to this queue and processes the messages.

We have one connection created and had coded the application under the
assumption that a consumer created on a session would only process one
message.  However, it appears that the session grabs all available messages
and "flags" them as being for that session and that session only so that our
multi-threaded message handler is actually just sitting there most of the
time while only one thread processes all a session's messages.  Our messages
are unrelated so we do not need transacted sessions and we use client
acknowledgment of messages - and in fact, a rollback of a transacted session
would have VERY undesirable consequences for us.

We would like one of the following:

1)  Either restrict a session to only "flag" one message for processing and
then spawn consumers to deal with the one message flagged, or

2)  Use only one session in the message processing app and have it flag ALL
messages received, always.

If further information is required, please let me know.  Any help would be
appreciated.

--adam
-- 
View this message in context: 
http://www.nabble.com/How-to-enforce-1%3A1-mapping-of-session-to-message-tp22686711p22686711.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to