Hello,
I appreciate any help on this.
I would like to iterate a local session store, that is set up by a Kafka Streams DSL topology definition, as a key-value store.
The short rationale is being able to traverse the local state store periodically by a non-Streams topology thread and evaluate timeouts for ongoing transactions.
I have attempted to open the session store from a KafkaStreams object as a key-value store, but the Kafka code prevents this usage with the following check:
private abstract static class QueryableStoreTypeMatcher<T> implements QueryableStoreType<T> {
private final Class matchTo;
QueryableStoreTypeMatcher(Class matchTo) {
this.matchTo = matchTo;
}
public boolean accepts(StateStore stateStore) {
return this.matchTo.isAssignableFrom(stateStore.getClass());
}
}
Since, by definition, everything in RocksDB is a key-value pair, including the session information, it would make sense to be able to treat the sessions as key-value pairs.
So, is there another way of just traversing the session store kay-value tuples from RocksDB, using the Kafka Streams API, and not programming directly against RocksDB?
P.S. Right now, the session store implementation requires the user to know the keys of tuples that he or she wants to fetch and traverse. Whereas, I need to traverse all the tuples, without storing the keys someplace else. I am using Confluent 3.2.0/Kafka 0.10.2.0 libraries.
Thanks in advance!
- Alex