RabbitMQ: Direct Exchange vs Fanout Exchange

I tried to use RabbitMQ and came across the following question (very similar to this: Exchange vs Direct Exchange topic in RabbitMQ ).

I need to intensively broadcast about 800 types of messages (so there will be many consumers for each type of message), and I wonder which of the following approaches is better:

  • Create one direct exchange where messages with a routing key (message type name) will be sent, and each consumer will be connected to it with a temporary link to the queue with the corresponding routing key. (Since there are no complex routing keys, such as "key1.key2. *", I decided not to use a topic exchange).

  • Create a branching exchange for each type of message.

I read a very good article on performance issues - MODEL TOPOLOGIES FOR PERFORMANCE AND SPEED WITH RABBITMQ , but I'm new to RabbitMQ and just want more tips on best practice.

+4
source share
1 answer

Go with the routing key, it will be easier and more efficient :)

-2
source

Source: https://habr.com/ru/post/1483672/


All Articles