RabbitMQ Common Mistakes: Chapter Two
Gabriele Santomaggio
Distributed Systems | RabbitMQ Team Member | Open Source Addicted
As a RabbitMQ user, consultant, and now a member of the RabbitMQ team, I've noticed recurring mistakes that many users still make. In this series of posts, I will highlight these mistakes and offer practical solutions to help you avoid them. By the end of this series, you'll learn how to optimize your usage of RabbitMQ and enhance your system's efficiency.
Chapter Two: Use Classic Queues for Everything
"Classic queues" (CQ) were the first type of queue introduced in RabbitMQ and have been used for many years. We all appreciate classic queues ??, but there are other queue types:
It's surprising how many users rely only on Classic Queues for everything!
Here are some reasons why:
Just so you know:
Should I stop using classic queues?
No, absolutely not! The RabbitMQ team continues to support classic queues, which are suitable for specific use cases that other queue types cannot address.
What should you do?
Use the appropriate queue type for the proper context. It sounds simple, right? In most instances, Quorum queues (QQ) can effectively replace classic queues. You can change the default queue type in your virtual host options in this way clients will define QQ as default. See:
领英推荐
Here's a summary of when to use the different queue types:
- Quorum Queues (QQ): Use when you require data replication and the AMQP behavior.
- Classic Queues (CQ): Use for scenarios like exclusive queues and/or when replication is unnecessary.
- Stream Queues (SQ): Unlike CQ and QQ, which are FIFO (First In, First Out) queues, messages are removed once consumed and acknowledged. Stream queues operate as an append-only system. They can store millions of messages, messages replay, have high throughput and enable large-scale fanout.
Conclusions
This post encourages you to explore the different types of queues available in RabbitMQ rather than forcing a single solution.
For more information, check out:
Happy RabbitMQ messaging! ??
Engineering Manager @InPost
2 周This is really interesting, I need to identify the right way to make a decision to use a classic queue or not. I need to go deeper into this topic!
Senior Software Developer @ XTEL
2 周Short, direct on point and very self-explanatory newsletter. Well done. In addition would be great to have real scenario examples of adoption?
R&D + coding | ?? FusionCache | Google OSS Award | Microsoft MVP Award
2 周Not a RMQ expert, but versions/dates when quorum and stream queues have been introduced seem odd, 3.8 release after 3.9? Maybe a typo?