-
1. Re: Message ordering within Topic
ataylor Apr 21, 2010 3:28 AM (in response to mayankmit2002)Is it the callback listener or the MDB that is the client receiving messages out of order?
-
2. Re: Message ordering within Topic
mayankmit2002 Apr 21, 2010 3:30 AM (in response to ataylor)No, itz Topic clients which are receiving messages our of order.
-
3. Re: Message ordering within Topic
ataylor Apr 21, 2010 3:36 AM (in response to ataylor)Actually I didn't realize you were taling about topics. The issue with strict ordering is a queue issue, this is because you can have multiple consumers on a queue, i.e a pool of MDB's, but cant control ordering strictly as different consumers consume at different rates. With topics, every subscriber receives every message, The only way a message would be received out of order was if it was redelivered somehow.
maybe i am not understanding your topology properly?
-
4. Re: Message ordering within Topic
timfox Apr 21, 2010 4:45 AM (in response to ataylor)Andy is right, strict ordering on a topic doesn't really make any sense.
The whole point of a topic is that each subscriber gets a copy of a message which is consumed in parallel.
If messages are consumed in parallel, how can you have strict ordering.
I think what is lacking here is a details description of what the user means by strict ordering on a topic.
-
5. Re: Message ordering within Topic
mayankmit2002 Apr 21, 2010 4:57 AM (in response to timfox)I think what is lacking here is a details description of what the user means by strict ordering on a topic.
Actually, what message ordering meant here is, let say, on completion of within a transaction we are firing 4 events E1, E2, E3 and E4 on a topic, then others client should should receive events in the same order i.e. E1,E2,E3 and E4.
But, in our case, most of time , we receives event in the same order,but times we lost the order.
Andy is right, strict ordering on a topic doesn't really make any sense.
what I understand from your comment is that, strict ordering of messages is not possible with topic and is not recommended as well, but our problem is that we any how need to perform operations in the order, the events were fired from the server,
Is there any best way you can suggest, which we can use to solve our problem.
-
6. Re: Message ordering within Topic
timfox Apr 21, 2010 5:01 AM (in response to mayankmit2002)Ok, I think what you mean is a strict ordering for topic *subscribers* not a strict ordering over the entire topic (which wouldn't make a lot of sense).
You want each topic subscriber to receive messages in the order they were sent from a particular producer.
This requirement is already guaranteed by both JBoss Messaging and HornetQ, since it's a requirement of the JMS spec (see section on ordering guarantees in JMS spec).
If you can provide a test case demonstrating where this is not occurring, we can take a look.
-
7. Re: Message ordering within Topic
ataylor Apr 21, 2010 5:04 AM (in response to mayankmit2002)I still dont fully understand what yoe mean. If you have 1 producer sending message m1, m2, m3, m4 to a topic in the scope of a transaction then all subscribers will receive these in that order unless 1 or more of the messages are redelivered for some reason. Are you saying this is not the case?
-
8. Re: Message ordering within Topic
mayankmit2002 May 6, 2010 6:32 AM (in response to ataylor)Yes, it is like that, but not alwayz...
Most of the time, subscriers receives messages in the order, but other times order gets disturbed.
-
9. Re: Message ordering within Topic
timfox May 6, 2010 6:36 AM (in response to mayankmit2002)This is all very vague.
If you think there is an issue, please submit a test program that demonstrates it, and we will investigate.