Kafka pro event streaming a vysoký throughput. RabbitMQ pro task queues a routing.
Kafka¶
- Distributed event log (append-only)
- Extrémní throughput (miliony msg/sec)
- Persistence — replay od libovolného offsetu
- Consumer groups — horizontální scaling
- Ideální pro event sourcing, data pipeline, analytics
RabbitMQ¶
- Traditional message broker
- Flexibilní routing (exchanges, bindings)
- Message acknowledgment a retry
- Nižší latence pro single messages
- Ideální pro task queues, RPC, workflows
Srovnání¶
- Throughput: Kafka >> RabbitMQ
- Latence: RabbitMQ < Kafka
- Persistence: Kafka = log, RabbitMQ = until consumed
- Routing: RabbitMQ flexibilnější
- Komplexita: oba srovnatelné
Kdy co¶
- Kafka — event streaming, data pipeline, analytics, high throughput
- RabbitMQ — task queues, microservices communication, RPC
Kafka pro streaming, RabbitMQ pro messaging¶
Kafka když potřebujete log a replay. RabbitMQ pro klasický messaging.
kafkarabbitmqmessagingevents