2 Comments

  1. derekgreer
    February 5, 2021 @ 07:29

    Good article. Just a few things. In the section on messaging patterns, you state: “RabbitMQ supports classic message queuing out of the box. A developer defines named queues, and then publishers can send messages to that named queue.” From a practical stand point, this is correct. RabbitMQ does allow you to emulate a simple message queue. Technically speaking, however, producers never send messages directly to a queue. RabbitMQ has a type of exchange called a “direct exchange” which filters queue delivery based on a routing key which get routed to queues based on the routing key matching the binding key. In truth, every single exchange type RabbitMQ offers really is just the publish-subscribe pattern with optional filtering. So, while RabbitMQ does use a queue as part of its exchange/queue/optional filtering implementation, message queuing is also emulated in RabbitMQ, albeit in a different way than Kafka’s emulation.

    In the section on Implementing Message Patterns with Kafka, you state: “A producer can send messages to a specific topic, and multiple consumer groups can consume the same message. Each consumer group can scale individually to handle the load.” This is true, but slightly misleading. I think you point this out elsewhere, but Kafka balances topic partitions across consumers within a consumer group. This means if a topic has 3 partitions, you can only scale in multiples of 3. if you scale to 4 consumers, you will have one consumer that will sit idle. So, a given topic with 3 partitions can have 10 different consumer groups which vary in multiples of 3, but they can’t scale completely individually. They all have to scale using the same partition count as a factor (as opposed to the scaling strategy of RabbitMQ of varying the number of consumers for one queue completely independently of another).

    Reply

  2. Eran Stiller
    February 5, 2021 @ 09:01

    Hi @derekgreer, thank you for reading and thank you for your comment! I agree with the points you raise here. They are correct.

    Reply

Have an Opinion?