activemq-artemis/docs/user-manual/en/wildcard-syntax.md
Justin Bertram 2dc76bd9f4
ARTEMIS-3657 refactor address docs
Mainly refactoring the address docs. This commit has the following
changes:

 - Remove examples for discouraged use-cases (e.g. using anycast and
multicast on the same address).
 - Reword to use configuration terms wherever possible. For example,
instead of saying "point-to-point" (which is not a configuration term)
say "anycast". References to things like "point-to-point" and
"publish-subscribe" are still there since users are familiar with these
terms. They're just used much less often.
 - Remove duplicate explanation of exclusive queues.
 - Remove duplicate explanation of auto-create and auto-delete elements.
 - Re-create graphics and include the master SVGs for potential updates
later.
 - Give non-destructive queues its own chapter.
 - Add details about specifying routing type using a message property.
 - Update the styling on the user manual's cover page to look better.
 - Lots of re-wording for clarity's sake.
 - Re-order sub-sections for clarity's sake.
 - Break up the address model and the settings documentation. The
settings documentation is large and deserves its own chapter. The
original anchor link is still available with a link to the new chapter.

In general the address-specific documentation should be much more clear,
concise, and consistent now.
2022-02-26 15:14:32 -06:00

43 lines
1.4 KiB
Markdown

# Wildcard Syntax
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](https://www.amqp.org).
An Apache ActiveMQ Artemis wildcard expression contains words delimited by the character
`.` (full stop).
The special characters `#` and `*` also have special meaning and can
take the place of a word.
The character `#` means "match any sequence of zero or more words".
The character `*` means "match a single word".
So the wildcard `news.europe.#` would match `news.europe`,
`news.europe.sport`, `news.europe.politics`, and
`news.europe.politics.regional` but would _not_ match `news.usa`,
`news.usa.sport` or `entertainment`.
The wildcard `news.*` would match `news.europe`, but not
`news.europe.sport`.
The wildcard `news.*.sport` would match `news.europe.sport` and also
`news.usa.sport`, but not `news.europe.politics`.
## 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.
```xml
<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.