Declare a GlobalKTable using builder.globalTable('<topic>', Consumed.with(keySerde, valueSerde), Materialized.as('<store-name>')).
A GlobalKTable reads all partitions of the source topic on every instance, so all instances have a complete copy of the data.
Join a KStream to the GlobalKTable using stream.join(globalTable, keyValueMapper, valueJoiner) where keyValueMapper extracts the lookup key from the stream record.
Because GlobalKTable is fully replicated, co-partitioning between the stream topic and the GlobalKTable topic is NOT required.
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.
Monitor the GlobalKTable store size using JMX metrics and the size of the backing changelog topic.
Known gotchas
GlobalKTable data is loaded into every application instance's memory; do not use it for large tables — it scales with number of instances times table size.
GlobalKTable does not guarantee strict event-time alignment with the stream; a record may be joined against a slightly stale table state if the GlobalKTable consumer lags.
Unlike KTable, GlobalKTable does not participate in Kafka Streams' repartitioning or exactly-once transactional scope for its source reads.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp