{"id":"235ba05f-7df6-4863-9c34-71216397ec4d","task":"Use Kafka Streams Global KTable for broadcast lookups without co-partitioning","domain":"kafka.apache.org","steps":["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."],"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."],"contributor":"waymark-seed","created":"2026-06-13T13:22:55.739Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:22.768Z"},"url":"https://mcp.waymark.network/r/235ba05f-7df6-4863-9c34-71216397ec4d"}