activemq-artemismessagebrokersonicmq

ActiveMQ Artemis: can a producer determine final broker destination?


I am evaluating ActiveMQ Artemis as a potential replacement for SonicMQ. In Sonic, we have the ability for a client producing a message to determine the final broker destination.

Simplified example:

For instance, a client in Europe may post a message to:

If I understand the Artemis documentation, this behaviour may be configured on a permanent basis via Queue Federation.

Will Artemis allow for the final destination broker / queue to be determined on a per-message basis?


Solution

  • Among other things, ActiveMQ Artemis supports "federation" between brokers which can automatically transfer messages from one broker to another. If you have a broker in two different regions it would be relatively trivial to create a "local" set of addresses & queues and a "remote" set of addresses and queues such that messages sent to the "local" resources would stay on that broker and messages sent to the "remote" resources would be automatically transferred to a broker in another region.

    Technically speaking, the original producer of the message doesn't have exclusive control of where the message goes because it operates independently of the federation configuration on the broker. The producer simply sends messages to a particular destination on the local broker and then the federation configuration decides where the message goes after that.

    Likewise, the final destination of the message isn't determined on a "per message" basis as if each message was individually inspected and the final destination is then based on some specific property of the message. Rather the message is just sent to a specific destination and then the broker's federation configuration decides where the message goes after that.

    In any event, ActiveMQ Artemis should be able to support your use-case. It has a very flexible and powerful address model and a broad suite of features for moving messages between brokers.