[jboss-user] [JBoss Messaging] - Re: Clustered server preference
do-not-reply at jboss.com
Thu Apr 17 13:07:09 EDT 2008
>From 188.8.131.52 JMS 1.1 Spec
anonymous wrote : JMS defines that messages sent by a session to a destination must be received
| in the order in which they were sent (see Section 184.108.40.206 Ã¢ÂÂOrder of Message
| Sends,Ã¢ÂÂ for a few qualifications). This defines a partial ordering constraint on a
| sessionÃ¢ÂÂs input message stream.
>From 220.127.116.11 of JMS 1.1. Spec:
anonymous wrote : The only ordering that is visible to receiving clients is the order of messages a session sends to a particular destination.
Bar priority messages etc. this tells me that my consumers should be consuming my messages in the order they were produced.
>From the sun jms faq:
anonymous wrote : Note that in order to prevent duplicate delivery of a message from a durable subscription or queue, a message that can still be acknowledged by a session cannot be redelivered to another message consumer. The message can only be redelivered to another message consumer when it can no longer be acknowledged by the session that initially received the message.
Nothing to preclude sending the next message in the queue to a different consumer before receiving the ack form the first one.
>From 5.8 in the JMS 1.1 Spec
anonymous wrote : Only QueueReceivers without a
| message selector will read messages in message producer order
My test program has one producer that produces messages that are consumed by 2 consumers. I use no priority fetch and no message selectors. Everything I read convinces me that the order that the messages are consumed should be the order that they were produced. Now it may be that you cannot guarantee order of delivery because if message 1 failed then that would preclude you from being able to deliver message 2 until message 1 was finally delivered and acknowledged. But one would think that bar any failures, the order of delivery would be the order the messages were received by the queue, not some absolutely random order.
The point is academic, however, because the JBM implementation dos not do this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4144956#4144956
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4144956
More information about the jboss-user