Chapter 3. The integrated ActiveMQ Artemis messaging broker
Apache ActiveMQ Artemis is an open source project for an asynchronous messaging system. It is high performance, embeddable, clustered and supports multiple protocols. JBoss EAP 8.1 uses Apache ActiveMQ Artemis as its Java Message Service broker and is configured using the messaging-activemq subsystem. This fully replaces the HornetQ broker but retains protocol compatibility with JBoss EAP 6.
3.1. Artemis Copy linkLink copied to clipboard!
The core Artemis is Java Message Service-agnostic and provides a non-Java Message Service API, which is referred to as the core API. Artemis also provides a Java Message Service client API which uses a facade layer to implement the Java Message Service semantics on top of the core API. Essentially, Java Message Service interactions are translated into core API operations on the client side using the Java Message Service client API. From there, all operations are sent using the core client API and Apache Artemis wire format. The server itself only uses the core API. For more details on the core API and its concepts, refer to the Artemis documentation.
3.2. Apache ActiveMQ Artemis Core API and Java Message Service destinations Copy linkLink copied to clipboard!
Let’s quickly discuss how Java Message Service destinations are mapped to Apache ActiveMQ Artemis addresses.
Apache ActiveMQ Artemis core is Java Message Service-agnostic. It does not have any concept of a Java Message Service topic. A Java Message Service topic is implemented in core as an address (the topic name) with zero or more queues bound to it. Each queue bound to that address represents a topic subscription. Likewise, a Java Message Service queue is implemented as an address (the Java Message Service queue name) with one single queue bound to it which represents the Java Message Service queue.
By convention, all Java Message Service queues map to core queues where the core queue name has the string jms.queue. prepended to it. For example, the Java Message Service queue with the name orders.europe would map to the core queue with the name jms.queue.orders.europe. The address at which the core queue is bound is also given by the core queue name.
For Java Message Service topics the address at which the queues that represent the subscriptions are bound is given by prepending the string jms.topic. to the name of the Java Message Service topic. For example, the Java Message Service topic with name news.europe would map to the core address jms.topic.news.europe.
In other words if you send a Jakarta Messaging message to a Java Message Service queue with name orders.europe, it will get routed on the server to any core queues bound to the address jms.queue.orders.europe. If you send a Jakarta Messaging message to a Java Message Service topic with name news.europe, it will get routed on the server to any core queues bound to the address jms.topic.news.europe.
If you want to configure settings for a Java Message Service queue with the name orders.europe, you need to configure the corresponding core queue jms.queue.orders.europe:
<!-- expired messages in JMS Queue "orders.europe" will be sent to the JMS Queue "expiry.europe" -->
<address-setting match="jms.queue.orders.europe">
<expiry-address>jms.queue.expiry.europe</expiry-address>
...
</address-setting>