Product SiteDocumentation Site

1.3. Topic Exchange

A Topic exchange is similar to a Direct exchange, but uses keys that contain multiple words separated by a “.” delimiter. A message producer might create messages with routing keys like usa.news, usa.weather, europe.news, and europe.weather.
Binding keys for a Topic exchanges can include wildcard characters: a “#” matches one or more words, a “*” matches a single word. Typical bindings use binding keys like #.news (all news items), usa.# (all items in the USA), or usa.weather (all USA weather items).
The exchange routes messages to the relevant queue or queues, depending on matches between the routing and binding keys.
Topic Exchange
A Topic exchange can use multi-part routing keys and bindings that include wildcards. A topic exchange sends a message to a queue if the message's routing key matches the binding key for the queue, using wildcard matching.