Apache ActiveMQ Artemis uses a specific syntax for representing wildcards in security settings, address settings and when creating consumers.
The syntax is similar to that used by AMQP.
An Apache ActiveMQ Artemis wildcard expression contains words delimited by the character
. (full stop).
The special characters
* also have special meaning and can
take the place of a word.
# means "match any sequence of zero or more words".
* means "match a single word".
So the wildcard
news.europe.# would match
news.europe.politics.regional but would not match
news.* would match
news.europe, but not
news.*.sport would match
news.europe.sport and also
news.usa.sport, but not
Customizing the Syntax
It's possible to further configure the syntax of the wildcard addresses using the broker configuration.
For that, the
<wildcard-addresses> configuration tag is used.
<wildcard-addresses> <routing-enabled>true</routing-enabled> <delimiter>.</delimiter> <any-words>#</any-words> <single-word>*</single-word> </wildcard-addresses>
The example above shows the default configuration.