[jboss-user] [Messaging, JMS & JBossMQ] - Re: Sequential processing of messages with the same Key

adrian@jboss.org do-not-reply at jboss.com
Wed Jul 25 15:09:06 EDT 2007


Ok, since I haven't answered this question this month, I'll answer it again,
but only in the short version (well actually with the full caveats in case
somebody else figures out where the search engine is - its in the top right by the way :-).

What you are asking for is the default behaviour, but you need to think about it.

Messages are delivered in the order they are sent.

But with the following caveats.
1) They all have the same priority
2) The receiver is not filtering messages (i.e. ignoring some messages)
3) There is only one sender (senders can race with each other when sending)
4) There is only one receiver on the queue (messages could go to different receivers
if there are multiple) - not relevant for topics
5) A message is not NACKed (negatively acknowledged) - if a message is Nacked
and redelivered then all bets are off
6) You don't use scheduled delivery

So the answer to your question is (partially) to create topic subscriptions with a selector 
for each customer, but be prepared for redelivery not respecting the order.

MessageListener instances (client side) can be attached to multiple subscriptions.
And JBoss supports multiple subscriptions for an MDB (not in the spec) 
by configurating multiple invoker-proxy-(bindings) in jboss.xml

How you avoid the senders racing with each other is something you'll have to
resolve yourself (if that is relevant), probably with some kind of shared lock
on who can send messages.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067565#4067565

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067565



More information about the jboss-user mailing list