NestJS · Senior · Question 15 of 75
In Nest microservices over Kafka, what must handlers be prepared for?
- 1Messages always arrive in global order
- 2Exactly-once delivery by default
- ✓Correct answer: At-least-once delivery and redelivery after rebalances, so handlers must be idempotent; ordering is guaranteed only within a partition
Explanation
Choose message keys so related events go to the same partition, and commit offsets only after successful processing.