Skip to main content
Support

KB Article #181085

Embedded ActiveMQ JMS message order

Problem

  • Does the API Gateway embedded ActiveMQ JMS provider enforce FIFO or sequential message delivery?
  • Embedded ActiveMQ in high availability (HA) mode, JMS message order during a failover or HA event.
  • Keywords: HA mode, shared message folder, master broker, single consumer sequenced JMS messages.


Resolution

Some JMS providers have specific settings or modes where they can enforce JMS message delivery order matches message submission order, such specific treatment does not apply to this discussion.


Even so, most JMS providers can often be assumed to deliver messages in the same order they were received, when some conditions are met, such as: may not apply to a cluster of brokers, single client connection pulling messages and not concurrent consumption from multiple consumers, etc.


Such FIFO consumption of JMS messages is NOT the case when using embedded ActiveMQ in HA mode (i.e. a group of two or more instances all using a common shared message folder). Our HA mode allows for message availability, but does not maintain message order.


High availability mode for the embedded JMS providers allows for messages to be sent to or consumed from any node in the group, and for any messages residing on a node that goes offline to be accessible from other instances in that group. But, the mechanism whereby messages are moved from one node to another causes them to move to the tail of the queue. More info on the cluster topology, KB 181087.


Note, any external JMS client connections need to do their part in this HA setup by using ActiveMQ failover transport syntax in order to automatically fail over to an alternate broker. Ref KB 180587.