This discussion is archived
2 Replies Latest reply: Jul 2, 2010 12:01 PM by 807581 RSS

In what order are msgs consumed with single sess & multiple async consumers

807581 Newbie
Currently Being Moderated
Sun MQ will serialize delivery of messages when you have a single session and multiple asynchronous consumers created from that session. I am trying to find out what is the order in which the messages will be delivered by the session to the message listener.
So if I have 10 consumers on 10 destinations, each with 100 messages, in what order will messages be passed to the message listener.

Thanks
Aspi Engineer
Putnam Investments
  • 1. Re: In what order are msgs consumed with single sess & multiple async consumers
    807581 Newbie
    Currently Being Moderated
    In our testing, we have found that the consumerFlowLimit implementation will guarantee that you'll receive your messages out of order. What happens is that messages will be put in the consumer buffer and they won't be available for round-robin delivery to the other consumers (even if they are idle). I'd recommend setting the consumerFlowLimit=1 which minimizes the impact of this, but every other message will still be out of order (ie consumer #1 grabs messages 1&2, consumer #2 grabs messages 3&4, etc; so that they will process 1&3 together, and 2&4 together. I consider this a very serious bug of openMQ and wish we could disable the consumerFlowBuffer all together to get guaranteed processing order from the queue.

    Edited by: Pancetta on Jun 24, 2010 9:33 AM
  • 2. Re: In what order are msgs consumed with single sess & multiple async consu
    807581 Newbie
    Currently Being Moderated
    1). The issue of prefetch by client runtime on Consumer.receive() with imqConsumerFlowLimit=1, CR6727929, has been fixed in 4.5, available in build12 - by setting a new connection factory property imqConsumerFlowLimitPrefetch=false

    2). JMS specification does not specify the order of message delivery across destinations (JMS 1.1 spec 4.4.10.1) or to multiple QueueReceivers (JMS 1.1 spec 4.4.9). For GlassFish Message Queue, message delivery order in these situations depends on several runtime factors, e.g. flow control settings, processing speed, ...