Kbase P144111: The SonicMQ ABL Adapter is receiving messages out of order when using 2 or more subscribers in the s
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  16/04/2009 |
|
Status: Unverified
SYMPTOM(s):
The SonicMQ ABL Adapter is receiving messages out of order when using 2 or more subscribers in the same session
Having two or more subscribers in the same session affects the message receive order
The message ordering is not guaranteed for 2 or more subscribers in the same session
FACT(s) (Environment):
OpenEdge 10.x
All Supported Operating Systems
CAUSE:
When 2 or more subscribers are created in 1 session, each subscriber has its own delivery queue which will preserve order for that subscribers' messages.
The JMS 1.1 spec defines that:
"messages sent by a session to a destination must be received in the order in which they were sent (see Section 4.4.10.2 "Order of Message Sends," for a few qualifications). This defines a partial ordering constraint on a session's input message stream."
However:
"The messages for each of a session's consumers are interleaved in a session's input message stream."
Even though the messages are received by the Session in the order that they were published, they are then placed into the consumers' input buffers. If the receive mode is asynchronous, then once the messages are in the consumers' input buffers a separate Session Delivery Thread wakes up and dispatches each consumer's buffer. If the consumers are all listening on the same topic, the actual order of the messages received will be determined by the order in which these buffers are processed by the delivery thread.
FIX:
Use a single MultiTopic subscription. This will maintain message order, because there is a single thread servicing that subscriber and a single consumer input queue.