Skip to content

Global Stores

StreamsBuilder.addGlobalStore adds a global StateStore to a topology.

Such a StateStore sources its data from all partitions of the provided input topic. This store uses the source topic as changelog (and during restore will insert records directly from the source).

Global stores should not be added to Processor, Transformer, or ValueTransformer (unlike regular stores). They have read-only access to all global stores by default.

There will be exactly one instance of this StateStore per Kafka Streams instance.

A SourceNode will be added to consume the data arriving from the partitions of the input topic.

Back to top