liveBook · Manning

Source of truth

As explained in Kafka for Architects

A source of truth is the authoritative system or record from which the canonical value of information is determined.

A source of truth is the authoritative system or record used to determine canonical information. In architecture, it may hold business state, infrastructure configuration, or event schemas. section 1.7.2 section 10.2.2

Common architectural choices include:

  • An indefinitely retained Kafka log can be authoritative for entity state: consumers replay immutable changes and reconstruct the current value locally. section 1.7.2
  • Git can be authoritative for Kafka infrastructure: declarative YAML or JSON defines the desired cluster state, while CI/CD reconciles differences. section 10.2.2
  • An Avro schema stored in Git can be authoritative for event structure, with AsyncAPI referencing the concrete schema. section 6.3.5

Customer address reconstruction

CustomerService publishes address updates to a retained change-log topic. A service that needs customer addresses replays the log from the beginning and stores the resulting state in memory or a local database. The log remains authoritative, while the local copy supports application use and enrichment of order streams. section 1.7.2

Figure 10.1 Applying Kafka cluster modifications via GitOps: after the updated Kafka cluster configuration is pushed, the CI/CD pipeline retrieves the current cluster state, calculates the required modifications, and applies them.
A screenshot of a computer

AI-generated content may be incorrect.

The diagram shows GitOps reconciliation: a pipeline compares the Kafka cluster with the desired configuration in Git and applies only the required modifications. section 10.2.2

How Kafka for Architects covers it

How deep it goes
Explains replay and reconciliation workflows, then stops short of making Kafka a general-purpose database.
Examples
Uses customer address change logs, order enrichment, Git-managed Kafka configurations, and externally referenced Avro schemas.
What it assumes
Assumes familiarity with Kafka consumers and topics, Git, CI/CD, and event or schema definitions.
What you can do after
Designs authoritative state, configuration, or schema ownership while accounting for replay, drift, query, and translation trade-offs.
How it connects
Connects event sourcing, Kafka, GitOps, CI/CD, AsyncAPI, Avro schemas, data contracts, and database responsibilities.

Also explained in

Compare how 8 books explain source of truth →

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.