So, the question is about safety to use external state storage inside stream functions like filter, map and etc.
Is it ok to do something like this:
JedisPool pool = ...;
KStream stream = ...;
stream.map((k, v) -> {
JedisClient client = pool.getResource();
....
client.close();
});
...
KafkaStreams streams = ...;
Can it cause errors because of using single pool inside multiple streaming tasks?
In apache flink i can use Rich*Function<> where i can configure connection pool to any storage only once inside open method. In apache spark i also can configure global connections. Do i need to do the same using kafka streams or not?