Enum metalmq_client::Binding
source · pub enum Binding {
Direct(String),
Topic(String),
Fanout,
Headers {
headers: HashMap<String, String>,
x_match: HeaderMatch,
},
}
Expand description
Describe the queue binding.
Variants§
Direct(String)
Direct binding routes messages to a bound queue if the routing key of the message equals to the routing key in the binding.
Topic(String)
In topic binding the message routed if the routing key of the message conforms to the topic exchange pattern. The pattern can be an exact routing key in this case the match is equality. It can contain asterisks which means any string separated by dots, like “stock..” matches “stock.nyse.goog”. It can contain hashmark which covers multiple dot-separated parts, like “stock.#” matchs to all substrings including one with dots.
Fanout
Fanout exchange broadcast message to each bound queues.
Headers
Headers binding matches the messages by their headers. Any or all header should match
depending on the HeaderMatch
value. Currently header values are String
s only.