liveBook · Manning

ACID

As explained in Kafka for Architects

ACID is the set of atomicity, consistency, isolation, and durability properties that define conventional transactional behavior.

ACID names four properties of conventional transactions: atomicity, consistency, isolation, and durability. Together, they describe how a transaction preserves valid data while preventing partial or prematurely visible changes. section 7.4.2

The properties divide transactional behavior into four guarantees:

  • Atomicity completes every operation or rolls back the entire transaction, preventing partial updates. section 7.4.2
  • Consistency moves the system between valid states while preserving defined rules and data-integrity constraints. section 7.4.2
  • Isolation hides intermediate transaction states from concurrent readers. section 7.4.2
  • Durability makes committed changes permanent despite system failure. section 7.4.2

Kafka applies transactional ideas to a read-process-write pipeline rather than presenting only database-style transactions. Kafka transactions coordinate consuming input events and producing output events, supporting exactly-once semantics across retries and failures. section 7.4.2

Order processing across downstream topics

An OrderService reads an event from ORDERS, processes it, and writes corresponding events to SHIPMENTS, BILLING, and INVENTORY. Exactly-once processing ensures that each input order produces one event in each destination, avoiding duplicates or omissions when the service fails. section 7.4.2

Figure 7.24 OrderService reads, processes, and writes each event atomically.
A white rectangle with black text

AI-generated content may be incorrect.

Visualizes an OrderService reading, processing, and writing each event atomically. section 7.4.2

Figure 7.27 Isolation levels determine whether consumers can read uncommitted messages. This figure shows two consumers with different isolation settings.
A diagram of a mail

AI-generated content may be incorrect.

Shows how isolation settings determine whether consumers can read uncommitted messages. section 7.4.2

How Kafka for Architects covers it

How deep it goes
Defines all four properties and contrasts them with Kafka transactions, stopping short of database implementation internals.
Examples
Uses an OrderService writing shipment, billing, and inventory events from each order.
What it assumes
Builds from zero by defining atomicity, consistency, isolation, and durability before discussing Kafka-specific differences.
What you can do after
Apply Kafka transactions to coordinate exactly-once outputs across a read-process-write pipeline.
How it connects
Connects ACID with Kafka transactions, exactly-once semantics, stream processing, and isolation levels.

Also explained in

Compare how 7 books explain ACID →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kafka for Architects. The section links point to the parts of the book it draws on.