RabbitMQ Exchange Mode - topic

Any message sent to Topic Exchange will be forwarded to all Queues that care about the topic specified in RouteKey

1. This mode requires RouteKey, and Exchange and Queue must be bound in advance

2. If Exchange does not find a Queue that matches the RouteKey, it will Discard this message

3. When binding, provide a topic that the queue cares about, such as "#.log.#" means that the queue cares about all messages involving log (a message whose RouteKey is "MQ.log.error" will be forwarded to the queue)

4. "#" indicates 0 or several keywords, "*" indicates a keyword. For example, "log.*" can match with "log.warn", but cannot match with "log.warn.timeout"; but "log.#" can match with the above two




reference: http://blog.csdn.net/ csethcrm/article/details/51673050


Example: http://www.cnblogs.com/luxiaoxun/p/3918054.html

Example: http://blog.csdn.net/a491857321/article/details/50616323

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326991619&siteId=291194637