When an online store accepts an order, checkout is only the beginning. Inventory has to update, the warehouse needs a packing request, the customer expects a confirmation, and analytics needs to record the sale. Those systems work at different speeds. The warehouse might be offline for maintenance while checkout continues taking orders. How do you tell each system what happened and give it a chance to catch up later?
Apache Kafka is an open-source, distributed platform built for that kind of problem. Applications publish records of what happened, and other applications read and process those records independently. Kafka stores the records according to configurable policies, so different applications can read the same event and return to earlier events while the data is still available. That combination of independent readers and a retained history explains much of Kafka’s appeal. kafka.apache.org
This CutChai Website Spotlight features KafkaTutorial.com, a technical blog with a searchable FAQ covering Kafka fundamentals, integrations, and operational questions. Its format makes it easy to look up the term you just encountered in a code review or architecture meeting. To make those individual answers easier to connect, let’s follow one order through a Kafka system. Kafka Tutorial
What an event looks like
An event is a record that something happened. In an online store, OrderPlaced could be the event type. The record might contain an order ID, a timestamp, a reference to the customer, and the items purchased. A shipping update or cancellation would be a separate event recording something that happened later. The team creating the event decides what details subscribers need and defines a format those subscribers can read.
In Kafka terminology, the checkout application is a producer because it writes the event. The inventory application is a consumer because it reads the event and acts on it. The warehouse, confirmation service, and analytics application can read it too. Checkout can finish publishing without waiting for the warehouse to pack a box. Each downstream application remains responsible for carrying out its own work and handling failures. KafkaTutorial.com has a plain-language primer on what Apache Kafka is. kafka.apache.org
That separation also changes what it takes to add a feature. Suppose the store wants a dashboard that counts orders as they come in. The dashboard’s backend can read the existing order events, provided it has permission and the events contain the data it needs. Checkout may need no code change. The teams still have a shared dependency, though. If checkout renames a field or changes what OrderPlaced means, subscribers that depend on the old format or meaning can break.
Topics, partitions, and brokers
A topic is a named stream of related records. The store might publish order events to order-events and shipment events to shipment-events. Consumers subscribe to the topics they need. A fulfillment service might read both, while a sales reporting application might start with orders alone. For a closer look at this unit of organization, see KafkaTutorial.com’s guide to Kafka topics. kafka.apache.org
A topic is divided into partitions. Kafka appends records to each partition in sequence, and a record’s offset identifies its position within that partition. An offset of 42 in partition zero refers to a different record from offset 42 in partition one. Partitions let Kafka spread storage and processing across machines. Kafka preserves the order in which records were written within each partition. Applications that read several partitions may see their records interleaved. kafka.apache.org
Imagine that fulfillment needs to see an order placement before it sees that order’s cancellation. If producers publish both events to the same topic using the order ID as the key and route them to the same partition, a consumer can read them in the order Kafka stored them. The producer still has to publish them in the intended sequence. Choosing a key is therefore a business decision as much as a technical one. Ask which records must stay together and whether a particularly busy key could concentrate work in one partition. The blog’s explanation of Kafka partitions is a useful next stop. kafka.apache.org
A broker is a Kafka server that stores and serves partitions. A cluster can keep replicas of a partition on multiple brokers so another eligible replica can take over if the leader becomes unavailable. Replication and partitioning solve different problems. Replication keeps copies of the same data for availability. Partitioning divides the data into separate logs so reads and writes can be distributed. A single-broker learning setup can demonstrate topics, offsets, and consumer groups. Experiencing broker failover requires a cluster with replicas on other brokers. kafka.apache.org
How multiple services read the same events
Kafka uses consumer groups to coordinate readers. Give fulfillment and analytics different group IDs, and each can read the same order stream while maintaining its own progress. If analytics falls behind during a maintenance window, fulfillment can keep going. Within the fulfillment group, several instances can share the work. In a conventional consumer group, Kafka assigns each partition to one group member at a time. With six partitions and three active fulfillment consumers, each can handle a share. Add more than six consumers subscribed only to that topic, and extra instances can sit idle. Apache Kafka
Consumers can commit offsets to record where they should resume. This sounds like bookkeeping until an application crashes between two steps. Imagine the fulfillment service creates a shipment in its database and crashes before committing its offset. On restart, it can read the same order again. Without a safeguard, it might create a second shipment. A unique order-based identifier in the shipment system is one way to recognize the repeat. The sequence of processing and committing determines what the application has to recover from. KafkaTutorial.com covers the terminology in its guide to Kafka offset commits. Kafka Tutorial
This is where the phrase exactly once deserves a closer look. Kafka supports exactly-once processing for appropriately configured workflows that read from Kafka and write results back to Kafka. A shipment created in another system is an external side effect. Avoiding duplicate shipments takes cooperation from the destination or application logic that recognizes repeated requests. The same question comes up with emails, payments, and database changes. Before relying on a delivery guarantee, identify where it applies and what happens if the application stops just after the external action succeeds. Apache Kafka
Why retention and replay matter
Kafka can keep an event after an application reads it. With delete-based retention, a topic can limit how much history it keeps by time or size. A consumer that goes offline can pick up where it left off if the records it needs are still there. A new consumer can start at an earlier available offset. That makes it possible to rebuild a dashboard, recompute a metric after correcting a bug, or test revised processing against a known set of events. kafka.apache.org
Say the store discovers its sales dashboard has been counting canceled orders as completed sales. If the relevant records remain available, the analytics team can correct the calculation and replay the events into a fresh reporting table. That same replay would have a very different consequence in the customer notification service. Reprocessing order records there could send confirmations again. Before replaying, decide where the output should go and which side effects should be suppressed. The ability to reread history is a feature. The ability to rerun a particular application safely comes from how that application was designed.
Retention is also a business decision. A topic with enough history to recover from a short outage may have too little history to rebuild a monthly report. Keeping all order events for longer increases storage needs and can extend how long sensitive information remains in the stream. Work backward from what each subscriber needs to recover or recalculate. Then decide how much history belongs in Kafka and whether a separate archive serves longer-term reporting.
Kafka Connect and Kafka Streams
Kafka Connect is a framework for moving data between Kafka and other systems using reusable connectors. A source connector can bring data into Kafka, and a sink connector can send Kafka records to another system. In the store example, a supported source connector could capture selected changes from an order database. A sink connector could send order events to an analytics destination. Check the specific connector’s behavior, especially how it handles restarts and errors. KafkaTutorial.com introduces the framework in its Kafka Connect FAQ. kafka.apache.org
Kafka Streams is a library for writing applications that process Kafka records. The store might use it to join orders with another stream, filter out test transactions, or calculate order totals for each five-minute window. The resulting application can publish a new topic that a dashboard or another service reads. A basic way to remember the distinction is to ask where the work is. Connect handles integration with a data source or destination. Streams handles application logic that derives new information from events. Read the blog’s Kafka Streams introduction for examples of what that processing can do. kafka.apache.org
When Kafka earns its place
Kafka makes a strong case when several independent systems need the same flow of events, when readers need to recover at different speeds, or when historical replay is part of the job. Think of shipment tracking, application activity logs, or devices publishing readings throughout the day. Each produces a stream that several teams may want to use for different purposes. KafkaTutorial.com’s overview of what Kafka is used for gives readers more examples to compare with their own workloads. kafka.apache.org
For a small application with one background worker and a few tasks, a managed queue may be easier to run. For a daily report with no need for live updates, a scheduled batch job may meet the requirement. With Kafka, a team takes on decisions about event formats, partition keys, retention, and monitoring. It also needs to know what to do when readers fall behind. The most useful question in an architecture discussion is what the team expects to gain from a shared, replayable event stream. If the answer is vague, the operating costs are easier to predict than the benefits.
How to use KafkaTutorial.com as you learn
Start with one topic and a few sample order events. Read them using two different group IDs, then restart one group and observe where it resumes after committing offsets. Once that makes sense, try a topic with several partitions and run two consumers in the same group. Pause one of them and see how the group redistributes work. Apache’s Getting Started documentation links to a quickstart for running Kafka locally and publishing and consuming your first events. Apache Kafka
For installation and operations, check the version before following any tutorial. KafkaTutorial.com’s FAQ index includes questions about ZooKeeper, which can help explain older deployments and articles you’ll still encounter. Apache Kafka 4.0 removed ZooKeeper mode and requires KRaft. If a setup guide tells you to start a ZooKeeper server, check which Kafka release it was written for before copying the commands. The Apache documentation for your release is the place to verify setup steps and configuration. Kafka Tutorial
The CutChai take
KafkaTutorial.com is most useful when you know which question you want answered. Its filterable index lets you move directly from a term like offset to a related question about restarting consumers, or from partition to questions about ordering and parallel work. Pair that reading with a small local exercise. Once you’ve watched fulfillment and analytics read the same order independently, stopped one reader, and seen it catch up, you’ll have a concrete explanation for what Kafka does and why a team might choose it. Kafka Tutorial