How to Prioritize Messages in Apache Kafka
Sep 10, 2020Ricardo Ferreira

Summary
This post explains why Apache Kafka does not natively support message prioritization, contrasting its event streaming model with traditional messaging systems. It details how Kafka's commit log and partition-based storage prevent direct message reordering. The post then proposes the 'bucket priority pattern' as a workaround, where messages are produced into different topics (buckets) based on their priority, allowing consumers to process them in a prioritized order without complex sorting logic. This pattern aims to provide a 'good enough' solution for prioritization needs within Kafka's architecture.
More from the Event-Driven Architectures trail
- InfiniteWatch + Confluent: Turning Customer Interaction Data into Real-Time Intelligence
- Streaming Data Integration with Apache Kafka® vs ETL
- Why Microservices Need Event-Driven Architectures for Agility and Scale
- How to Build Real-Time, Event-Driven Automation for Business Insights
- How to Build Real-Time Alerts to Stay Ahead of Critical Events