Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abhirockzz/c154f4c6af1676424ebb1197b0e56f1f to your computer and use it in GitHub Desktop.
Save abhirockzz/c154f4c6af1676424ebb1197b0e56f1f to your computer and use it in GitHub Desktop.
Kafka Streams Stores factory example
Stores.KeyValueFactory<String,Double> baseKVFactory = Stores.create("my-state-store")
.withStringKeys()
.withDoubleValues();
Stores.InMemoryKeyValueFactory<String, Double> inMemoryKVFactory = baseKVFactory.inMemory(); //ON-heap
StateStoreSupplier imMemoryStateStoreSupplier = inMemoryKVFactory.build();
Stores.PersistentValueFactory<String, Double> persistentKVFactory = baseKVFactory.persistent(); //OFF-heap
StateStoreSupplier persistentStateStoreSupplier = persistentKVFactory.build();
@kirkvicent
Copy link

does is work ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment