1.

What Is The Difference Between Topic Exchange And Headers Exchange In Rabbitmq?

Answer»

Topic exchanges are used to ROUTE messages to queues BASED on wildcard matches between the routing key and the routing pattern which in turn is specified by the queue binding. Based on a matching between a message routing key and this pattern, messages are routed to one or many queues.

Headers exchanges route based on arguments containing headers and optional VALUES. Headers exchanges are very SIMILAR to topic exchanges, but it routes based on header values instead of routing keys. A message is considered matching if the value of the header equals the value specified upon binding.

Topic exchanges are used to route messages to queues based on wildcard matches between the routing key and the routing pattern which in turn is specified by the queue binding. Based on a matching between a message routing key and this pattern, messages are routed to one or many queues.

Headers exchanges route based on arguments containing headers and optional values. Headers exchanges are very similar to topic exchanges, but it routes based on header values instead of routing keys. A message is considered matching if the value of the header equals the value specified upon binding.



Discussion

No Comment Found