0

I have a SpringBoot application with two stream processors mapped via Spring Cloud. Each processor has own @StreamListener for different topics. One processor writes aggregated data to the quarable state store. I facing the problem in my Unit test when fetching data through my @Service (Service get aggregated data from state store). For some reason from time to time catch exception:

org.apache.kafka.streams.errors.InvalidStateStoreException: the state store, recently-played-store, may have migrated to another instance. at org.apache.kafka.streams.state.internals.QueryableStoreProvider.getStore(QueryableStoreProvider.java:60) at org.apache.kafka.streams.KafkaStreams.store(KafkaStreams.java:1043) at org.springframework.cloud.stream.binder.kafka.streams.QueryableStoreRegistry.getQueryableStoreType(QueryableStoreRegistry.java:47)

When I remove StreamListener from another processor all works fine and stable.

How to bind state store for exact instance with proper Processor?

kovitals
  • 31
  • 3

1 Answers1

0

I have found the solution to my problem, maybe it will helps someone else. I used not the latest version of spring-cloud-stream-binder-kafka-streams. My version was 2.0.0 and it has a bug https://github.com/spring-cloud/spring-cloud-stream-binder-kafka/issues/366 . It was fixed only in the version 2.0.1

kovitals
  • 31
  • 3