简体   繁体   中英

Rabbit MQ Queing options

 I have a scenario where i need to get three different type of messages. They all contains same information. Lets take for e.g

I have 3 diffrent dealers of car Ford,Honda, Nissan. They all send me message about car and its specs.

Would you create three queses ABCCarCompany.E.Direct.Honda ABCCarCompany.E.Direct.Nissan ABCCarCompany.E.Direct.Ford OR just one ABCCarCompany.E.Direct.Cars and have them send the car manufacturer as parameter.. What are pros of creating 3 queses vs 1 ..

I recommend that you send all data into a single exchange, call it CarEx. 1 vs 3 queues depends on how you want to use the data. If you need to do the exact same thing with each car that comes in (like put it in a database) then you only need one queue. If you need to do something different for each car (like put into a database for Ford but send an alert for Nissan) then you would want 3 different queues.

If you have 3 different queues you can route the messages into them based on the routing key.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM