Friday, 15 February 2019

Rabbitmq notes

producer -> exchange -> queue -> consumer

queue has a routing key, exchange need to send the routing key that fits the rules for the message to be delivered to queue.

Rules are :
    Fan out : Exchange sends to all queue
    Direct:   Exchange sends message to queue where routing key(sends from producer) = binding key (*binding key is the key that binds exchange and queue(it is the routing key as well, between exchange and queue)
    Topic: Partial match of routing key & binding key
   Headers: Exchange uses message header instead of binding key
   Default: routing key = queue name

No comments:

Post a comment