The class `RocksDbSessionBytesStoreSupplier` is in package `internal`
and thus, you should not use it directly. Instead, you should use the
public factory class `org.apache.kafka.streams.state.Stores`
However, your usage seems correct in general.
Not sure why you pass-in the supplier directly though? In the end, if
you want to set a name for the store, you can use
`Materialized.as("..."), and you can set retention time via
`Materailazed#withRetention(...)` (what would be the proper usage of the
API).
Besides this, the store should be backed by a changelog topic and thus
you should never lose any data, independent of you deployment.
Of course, I would recommend to use a stateful set and re-attach storage
to the pod to avoid re-creating the store from the changelog.
HTH,
-Matthias
On 6/28/23 8:49 AM, An, Hongguo (CORP) wrote:
> Hi:
> I am using RocksDbSessionBytesStoreSupplier in my kafka streaming application for an aggregation li...