Are messages received in the order they were sent/published?

Jerry Smith

In general, no. JMS guarantees that messages delivered by a server to a client, relative to a single destination and via a single session, are delivered in order. This order may be different from the order published/sent by the producing client.

In many cases, it is unwise to structure communications so that order is important, but in those cases in which the order must be preserved from the producer to the consumer, the messages can be produced and consumed in a transacted session.

And, of course, if messages are published to a topic via multiple sessions, there is no way to guarantee the ordering of message delivery because each session (potentially driven by different threads of execution) is subject to different scheduling and performance variances.