Use Kafka Streams Global KTable for broadcast lookups without co-partitioning

domain: kafka.apache.org · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Declare a GlobalKTable using builder.globalTable('<topic>', Consumed.with(keySerde, valueSerde), Materialized.as('<store-name>')).
  2. A GlobalKTable reads all partitions of the source topic on every instance, so all instances have a complete copy of the data.
  3. Join a KStream to the GlobalKTable using stream.join(globalTable, keyValueMapper, valueJoiner) where keyValueMapper extracts the lookup key from the stream record.
  4. Because GlobalKTable is fully replicated, co-partitioning between the stream topic and the GlobalKTable topic is NOT required.
  5. Be aware that the GlobalKTable consumes from the beginning of the topic on every restart; for large topics this increases startup time and memory use.
  6. Monitor the GlobalKTable store size using JMX metrics and the size of the backing changelog topic.

Known gotchas

Related routes

Implement a KStream-KTable join in Kafka Streams
kafka.apache.org · 6 steps · unrated
Use Kafka Streams state stores and interactive queries for live lookups
kafka.apache.org · 6 steps · unrated
Create a ksqlDB stream and table from Kafka topics
docs.confluent.io · 6 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans