English · IndiaLog in
Rackwave Technologies
Request quote Free consultation
DataUpdated 25 Nov 2026

What Is Apache Kafka? Concepts, Use Cases and Architecture

Apache Kafka explained: core concepts, how it works, use cases and good practice.

Written by Rohan Verma
  • Published25 Nov 2026
  • Read time6 min
  • Length1,265 words
Share this guide

What is Apache Kafka? It is an open source distributed event streaming platform used to publish, store and process streams of events in real time. Instead of systems calling each other directly, they write events such as an order placed or a sensor reading to Kafka, and any number of other systems read those events when they are ready. Kafka handles very high volumes with low delay and keeps events for as long as you choose. This guide explains how Kafka works, its core concepts, common use cases, how it compares with message queues, and how to run it well.

Short answer: Kafka is a durable, scalable log of events. Producers append events to topics, which are split into partitions across brokers, and consumers read at their own pace. It is used for real-time data pipelines, event driven applications, activity tracking and stream processing.

What is Apache Kafka?

Kafka was created at LinkedIn and released as open source in 2011, and the Apache Kafka article on Wikipedia covers its history. It is now one of the most widely used technologies for moving data between systems. Kafka is a foundation for event driven architecture, for streaming parts of a data pipeline and for connecting services in a microservices design.

Core Kafka concepts

ConceptMeaningWhy it matters
Event, or recordA key, a value and a timestamp describing something that happenedThe basic unit of data
TopicA named stream of events, such as ordersOrganises events by subject
PartitionA topic is split into ordered partitions spread across brokersProvides parallelism and scale
BrokerA Kafka server that stores partitions and serves clientsA cluster has several for resilience
ProducerAn application that writes events to topicsPublishes without knowing consumers
Consumer and consumer groupApplications that read events, sharing the work in a groupScale reading and keep independent positions
OffsetThe position of a consumer in a partitionAllows replay and recovery
ReplicationCopies of each partition on other brokersProtects against server failure

How Kafka works

Diagram of Kafka producers writing to topics split into partitions on brokers and consumer groups reading
Figure 1. Producers append to partitions and consumer groups read independently.
  1. A producer sends an event. The event is assigned to a partition, often by hashing its key so related events stay in order.
  2. The broker appends it to a log. Events are written sequentially to disk, which is fast and durable.
  3. The event is replicated. Followers copy the data so a broker failure does not lose it.
  4. Consumers read the log. Each consumer group tracks its own offset and reads at its own speed.
  5. Events are retained. Kafka keeps events for a configured time or size, so new consumers can replay history.
  6. Processing and connectors extend it. Kafka Streams and other engines transform events, and Kafka Connect moves data to and from databases and applications.

Kafka compared with a traditional message queue

AspectMessage queueKafka
ModelMessage is removed once consumedEvents stay in a log and can be read again
ConsumersUsually compete for messagesMany groups can read the same events independently
OrderingPer queuePer partition
ThroughputModerateVery high
Best forTask distribution and simple messagingStreaming, event sourcing and data pipelines

Common Kafka use cases

Use caseExample
Real-time analyticsDashboards of clicks, payments or machine data. See what is real-time analytics
Data integrationStream database changes to a warehouse using change data capture
Event driven microservicesOrder service publishes events that inventory and billing consume
Activity trackingCapture user actions across web and mobile
Log and metric collectionCentralise telemetry. See what is observability
Fraud detectionScore transactions as they stream through
Machine learning featuresFeed fresh events into models. See what is machine learning

Running Kafka well

  • Choose partition counts based on throughput and consumer parallelism, and remember they are hard to reduce later.
  • Use a replication factor of at least three for production topics.
  • Choose keys carefully so related events share a partition and stay in order.
  • Monitor consumer lag, broker health and disk use. See what is observability.
  • Define schemas with a registry so producers and consumers can evolve safely.
  • Secure the cluster with encryption, authentication and access control lists.
  • Consider a managed service such as Confluent Cloud, Amazon MSK or Azure Event Hubs for Kafka to reduce operations work.

Common Kafka mistakes

  • Using Kafka for a small, simple queue where a lighter tool would do.
  • Too few or too many partitions, leading to bottlenecks or overhead.
  • Not handling duplicates, since a consumer may process an event twice. Make processing idempotent.
  • Ignoring schema management, so one change breaks many consumers.
  • Treating Kafka as a database for ad hoc queries.
  • Leaving retention and storage unmonitored until a disk fills.

Our system integration service designs event driven integrations on Kafka and similar platforms, and our data analytics service builds streaming analytics on top. For API based integration see our API development service.

A worked example: real-time order tracking

An online retailer wants customers to see live order status. Previously the order system called the warehouse, shipping and notification systems directly, and an outage in one of them slowed checkout. The team introduces Kafka. The order service publishes an order placed event. The warehouse system, the shipping system, the email service and an analytics pipeline each consume it independently and publish their own events when they finish, such as picked, shipped and delivered.

Checkout no longer waits for downstream systems, so a shipping outage does not affect sales, and the shipping team can catch up later by reading the backlog. A dashboard subscribes to all topics and shows order flow in real time. A new fraud check is added by simply reading the same events, with no change to the order service. The team spends time on idempotent consumers and schema rules, which prevent duplicate emails and broken readers when fields change.

Kafka ecosystem tools

ToolPurpose
Kafka ConnectSource and sink connectors for databases, storage and SaaS applications
Kafka Streams and ksqlDBProcess and query streams using code or SQL
Schema RegistryStores and checks event schemas so changes are compatible
MirrorMaker and cluster linkingReplicate topics between clusters or regions
Apache Flink and SparkAdvanced stream processing. See what is Apache Spark

Most production setups combine several of these. Connectors bring data in, a schema registry keeps formats under control, and a stream processor computes results such as running totals or alerts before writing them back to Kafka or to a warehouse.

Delivery guarantees

GuaranteeMeaningTrade-off
At most onceAn event may be lost but is never repeatedFast but risky for important data
At least onceNo loss, but an event may be processed twiceCommon default, requires idempotent consumers
Exactly onceEach event has its effect once within Kafka processingMore overhead and careful configuration

Most teams choose at least once delivery and design consumers to handle duplicates, for example by recording the id of each processed event. This is simpler and more robust than depending on exactly once behaviour across several external systems.

Key takeaways

  • Kafka is a distributed log for streaming events at high volume.
  • Topics, partitions, brokers, producers and consumers are its core ideas.
  • Consumers read independently and can replay events from the log.
  • It excels at real-time pipelines and event driven systems, not simple queues.
  • Plan partitions, schemas, security and monitoring from the start.

Quick glossary

TermMeaning
TopicA named stream of events
PartitionAn ordered slice of a topic
OffsetA consumer position in a partition
Consumer lagHow far a consumer is behind the latest event
Kafka ConnectA framework for moving data in and out of Kafka

Read next: What Is Data Lineage? Types, Tools and Implementation · What Is Data Fabric? Architecture, Benefits and Limits · What Is a Data Product? Definition, Contracts and Design

Frequently asked questions

What is Apache Kafka used for?

Kafka is used to stream events between systems in real time, for pipelines, analytics, event driven applications, log collection and integration between services.

What is the difference between Kafka and a message queue?

A queue usually deletes messages once consumed. Kafka retains events in a log so multiple consumers can read them independently and replay history.

What is a Kafka topic?

A topic is a named stream of events, such as orders. It is divided into partitions that spread the load across brokers.

What is a Kafka consumer group?

A consumer group is a set of consumers that share the work of reading a topic. Each partition is read by one member, which scales processing.

Is Kafka a database?

Not in the traditional sense. It stores events durably and can be replayed, but it is designed for streaming, not for flexible ad hoc queries.

Is Kafka hard to run?

Running Kafka yourself needs expertise in capacity, security and monitoring. Managed services reduce the effort considerably.

Does Kafka guarantee order?

Kafka guarantees order within a partition, not across a whole topic. Use the same key for events that must stay in sequence.

When should I not use Kafka?

Avoid it for small, simple messaging needs or request and response patterns, where a simpler queue or an API would be easier to operate.

Was this guide helpful?Your answer helps us decide what to improve. It is not linked to you.

#what is apache kafka#kafka architecture#kafka topics and partitions#kafka vs message queue#event streaming

About the author

Rohan Verma

Data Platforms Consultant

Rohan works across CDP, data warehouse, and analytics platform implementations, helping clients figure out which data infrastructure actually fits their scale rather than defaulting to whatever's currently trending.

Data Platforms & Technical Architecture

Ready to put AI and data to work?

Book a free consultation and leave with a plan, not a pitch.

Get a free consultationRequest quote