This chapter describes how JMS destinations are mapped to the Apache ActiveMQ Artemis address model. If you haven’t already done so, please read about the address model as it introduces concepts which are referenced here.

1. JMS Topic

A JMS topic is implemented as a address where the name of the address is the same as the name of the JMS topic.

A subscription on that JMS topic is represented as a multicast queue on the corresponding address. The queue is named according to the whether the subscription is durable and according to the client ID and subscription named provided via the JMS API.

Typically there is just one consumer per queue, but there can be multiple consumers on a queue when using JMS shared topic subscriptions. Any messages sent to the JMS topic is therefore routed to every multicast queue bound to the corresponding address and then dispatched to any consumers on those queues (i.e. JMS topic subscriber). If there are no queues on the address then the message is simply dropped.

This effectively achieves JMS pub/sub semantics.

2. JMS Queue

Likewise, a JMS queue is implemented as an address where the name of the address is the same as the name of the JMS queue.

However, there will be just one anycast queue on the corresponding address. All JMS consumers on this queue will share the messages in the queue. The queue is named the same as the address.

This effectively achieves JMS point-to-point semantics.