Question

Are messages received on a Websphere MQ topic that you are subscribed to strictly ordered?

In other words, in similar fashion to a queue, given that your connection is maintained are you guaranteed to receive the topic messages in the same order as they were sent?

Was it helpful?

Solution

As per JMS specs

JMS defines that messages sent by a session to a destination must be received
in the order in which they were sent. This defines a partial ordering
constraint on a session’s input message stream.

JMS does not define order of message receipt across destinations or across
a destination’s messages sent from multiple sessions. This aspect of a
session’s input message stream order is timing-dependent. It is not under    
application control.

Also

Although clients loosely view the messages they produce within a session
as forming a serial stream of sent messages, the total ordering of this stream
is not significant. The only ordering that is visible to receiving clients is
the order of messages a session sends to a particular destination.
Several things can affect this order like message priority, 
persistent/non persistent etc.

So to answer your question it is not really JMS provider specific what order messages are received. They will be received in the same order they were sent with above information. The order in which messages are delivered to the server however will be constrained by limitations like message priority, persistent/non persistent etc.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top