RabbitMQ Common Mistakes: Chapter Two

RabbitMQ Common Mistakes: Chapter Two

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:

  • Many client libraries default to using classic queues.
  • Many users are unaware that other queue types exist.

Just so you know:

  • Starting from version 4.0, RabbitMQ no longer supports mirroring for classic queues.
  • Quorum Queues are replicated by default. (You should use these)

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:


Article content


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! 🎉

Alessandro Minoccheri

Engineering Manager @InPost

5mo

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!

Roberto Bertuccio

Senior Software Developer @ XTEL

5mo

Short, direct on point and very self-explanatory newsletter. Well done. In addition would be great to have real scenario examples of adoption?

Jody Donetti

R&D + coding | 🦥 FusionCache | Google OSS Award | Microsoft MVP Award

5mo

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?

To view or add a comment, sign in

Others also viewed

Explore topics