CMQ routing key match is similar to exchange queue in RabbitMQ and can be used to filter messages so as to enable subscribers to get different messages by condition. When creating a topic, you can enable Routing Matching Key.
The binding key and routing key are used together and function in a way similar to the message filtering capability of RabbitMQ. The routing key carried when a message is sent is added by the client, and the binding key carried when a subscription relationship is created is the binding relationship between the topic and the subscriber.
.
, i.e., up to 16 phrases..
, i.e., up to 16 phrases.Example:
If the subscriber is 1.*.0, and the message is 1.any character.0, then it can be received by the subscriber.
If the subscriber is 1.#.0, and the messages are 1.2.3.4.4.2.2.0 and 1.0, then both of them can be received by the subscriber (the elements in the middle of the messages can be arbitrary).
If the subscriber is #, then the subscriber can receive all messages.
Was this page helpful?