1

So, let's comparable Kafka and RabbitMQ.

Kafka(Partition) = RabbitMQ(Queue)

Queue contains all messages like list.

What is benefit of partition in Kafka, why not use messages only in one partition?

Is it only fore replication?

POV
  • 11,293
  • 34
  • 107
  • 201

2 Answers2

2

If you have many partitions, when one partition goes down, you can still read from another (replication).

Also, many partitions mean higher throughput. Producers can produce faster and more. And consumers can consume more and faster (using Consumer group)

As your system gets bigger and bigger, you can just add more partitions without stopping your system.

enter image description here

enter image description here

Jin Lee
  • 3,194
  • 12
  • 46
  • 86
1

Kafka is not a queue, you cannot have selective acknowledgenents, which makes it way less usable as a queue.

There is already a subject not so far from your question ( actually, it's more the reverse, why Kafka and not a queue) :

Is there any reason to use RabbitMQ over Kafka?

To complete, and to answer more your question, in the other hand, Kafka partitions permit an easy transparent scaling out, by just playing with the numbers of partitions for a topic ( that would fit the number of consumers in a consumer group).

Yannick

Yannick
  • 1,240
  • 2
  • 13
  • 25
  • Does kafka confirm that message delivered to customer and consumer read message? – POV Jul 21 '19 at 19:47