Show Table of Contents
8.3.12. Routing Key Wildcards
Topic Exchange match logic is used for ACL rules containing a
routingkey property. These rules include:
- bind exchange <name> routingkey=X
- unbind exchange <name> routingkey=X
- publish exchange <name> routingkey=X
The
routingkey property is now matched using the same logic as the Topic Exchange match. This allows administrators to express user limits in flexible terms that map to the namespace where routingkey values are used.
Wildcard matching and Topic Exchanges
In the binding key,
# matches any number of period-separated terms, and * matches a single term.
So a binding key of
#.news will match messages with subjects such as usa.news and germany.europe.news, while a binding key of *.news will match messages with the subject usa.news, but not germany.europe.news.
Example:
The following ACL rules:
acl allow-log uHash1@COMPANY publish exchange name=X routingkey=a.#.b acl deny all all
Produce the following results when user
uHash1@COMPANY publishes to exchange X:
Table 8.11.
| routingkey in publish to exchange X | result |
|---|---|
|
a.b
|
allow-log
|
|
a.x.b
|
allow-log
|
|
a..x.y.zz.b
|
allow-log
|
|
a.b.
|
deny
|
|
q.x.b
|
deny
|

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.