STOMP clients use string-based destinations. Artemis maps these to internal addresses and queues based on routing semantics.
Client-Side Configuration
When sending a SEND frame, use the destination-type header:
ANYCAST: Maps the destination to an address of the same name and a queue of the same name.MULTICAST: Maps the destination to an address of the same name (for pub/sub).
When subscribing with a SUBSCRIBE frame, use the subscription-type header to specify similar semantics.
Broker-Side Configuration
You can control routing via:
- Prefixes: Set
anycastPrefix or multicastPrefix on the acceptor. For example, if anycastPrefix=queue/, a destination queue/foo is treated as anycast, and the prefix is stripped before creating address foo and queue foo. - Address Settings: Use
<address-setting> in broker.xml with a match pattern to define default-address-routing-type and default-queue-routing-type.
<address-settings>
<address-setting match="queue/#">
<default-address-routing-type>ANYCAST</default-address-routing-type>
<default-queue-routing-type>ANYCAST</default-queue-routing-type>
</address-setting>
<address-setting match="topic/#">
<default-address-routing-type>MULTICAST</default-address-routing-type>
<default-queue-routing-type>MULTICAST</default-queue-routing-type>
</address-setting>
</address-settings>
<wildcard-addresses>
<delimiter>/</delimiter>
</wildcard-addresses>