SmartIPlace’s Post

View organization page for SmartIPlace, graphic

48,242 followers

🚀 RabbitMQ. Message Routing Patterns 🌠 Overview In the RabbitMQ we can specify a few types/patterns of message routing. All their flows are presented in the carousel. So, message routing patterns: 🔸 Direct exchange 🔸Topic Exchange 🔸Fanout Exchange 🔸Headers Exchange 🚀 Direct exchange 🔸Sends messages to queues based on a message routing key. 🔸The routing key is a message attribute added to the message header by the producer. 🔸A message is routed to the queue(s) with the binding key that exactly matches the routing key of the message. 🔸Useful for distinguishing messages published to the same exchange using a simple string identifier. 🚀Topic Exchange 🔸Messages are directed to queues based on wildcard matches between the routing key and the routing pattern. 🔸The routing pattern determines whether a message is routed to one or multiple queues based on a match with the message's routing key. 🔸The routing key must be a list of words, delimited by a period ”.” 🚀Fanout Exchange 🔸Copies and routes a received message to all queues that are bound to it. 🔸The provided keys will be ignored. 🔸This is useful when the same message needs to be sent to one or more queues with consumers who may process the message in different ways. 🚀Headers Exchange 🔸Messages are routed based on arguments containing headers and optional values. 🔸Header exchanges are similar to topic exchanges, but they route messages based on header values instead of routing keys. 🔸A message is considered a match if the value of the header equals the value specified upon binding. Source : Taras Iskiv #dotnet #rabbitmq #softwaredevelopment

To view or add a comment, sign in

Explore topics