Skip to content

Event streaming platforms

An event streaming platform stores events in durable, ordered, append-only logs and lets many systems publish to them and read from them independently, in real time or by replaying history. Apache Kafka (opens in a new tab) is the best known; managed services such as Amazon Kinesis, Azure Event Hubs, Google Cloud Pub/Sub and Confluent Cloud, and alternatives such as Apache Pulsar and Redpanda, follow similar ideas.

Where a message queue hands out work, a stream records what happened. See message queue vs event stream for the comparison.

An event streaming platform1. Producers append events to a topic; events with the same key go to the same partition, in order. 2. Each consumer group reads every event and tracks its own position. 3. A second group reads the same events independently, and can rewind to reprocess history. Orders serviceproducer CDC connectorproducer Topicpartitions, retention Schema registrycompatibility checks Shippingconsumer group Analyticsconsumer group1schemas23
An event streaming platform Producers append events to partitioned topics; each consumer group reads every event at its own pace and can rewind.
  1. Producers append events to a topic; events with the same key go to the same partition, in order.
  2. Each consumer group reads every event and tracks its own position.
  3. A second group reads the same events independently, and can rewind to reprocess history.
  • Topics and partitions. A topic is a named stream, split into partitions for scale. Events with the same key (for example an account ID) always go to the same partition, so they stay in order. There’s no ordering across partitions.
  • Retention. Events stay for a configured time or size, or forever with compaction (keeping the latest event per key) or tiered storage in object storage.
  • Consumer groups and offsets. Each group tracks its position (offset) per partition. Within a group, each partition is read by one consumer, so the number of partitions caps a group’s parallelism.
  • Replication. Each partition is replicated across brokers; producers can wait for acknowledgement from several replicas before treating a write as durable.
  • Schema registry. Event schemas are registered and checked for compatibility, so producers can’t publish changes that break consumers.
  • Connectors and stream processing. Connectors move data in and out (for example change data capture from databases); stream processors such as Kafka Streams or Apache Flink (opens in a new tab) filter, join and aggregate streams.
  • One topic per event type or per entity, owned by the team that owns the data. Name topics by domain, not by consumer.
  • Choose keys for ordering: everything that must be processed in order needs the same key.
  • Choose partition counts for growth. Increasing partitions later changes which partition a key goes to, breaking per-key ordering for a while.
  • Publish business facts (OrderPlaced, PaymentCaptured) with stable schemas, not internal table rows, for anything other teams consume.
  • Include an event ID, type, version, time and the entity key in every event, so consumers can deduplicate and process idempotently.

A streaming platform becomes critical shared infrastructure. Decide early: managed service or self-run; who owns the platform; quotas per team; how topics are created (as code, reviewed); retention and cost; and how consumer lag is monitored and alerted.

  • Many consumers from one stream, added without changing producers.
  • Replay to rebuild state, backfill new systems or recover from consumer bugs.
  • High throughput with ordering per key.
  • Operating it well takes skill, or a managed service and its cost.
  • Ordering, partitioning and exactly-once semantics are easy to misunderstand.
  • Events become contracts; changing them needs the same care as APIs.
  • Using it as a work queue with per-message retries and delays it doesn’t natively provide.
  • A poison event blocking a partition, with no dead-letter or parking strategy.
  • Consumers with side effects replaying history and repeating them. See the replay that emailed every customer.
  • Assuming exactly-once end to end. Platform transactions stop at the platform boundary; consumers must still be idempotent.

Written and edited by Abhinav Taduka, enterprise software architect.