Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KafkaStreams Cleanup call #92

Closed
titaniumcoder opened this issue Jan 15, 2020 · 1 comment
Closed

KafkaStreams Cleanup call #92

titaniumcoder opened this issue Jan 15, 2020 · 1 comment

Comments

@titaniumcoder
Copy link

For resetting kafka streams correctly, the application would need to call the kafkaStreams.cleanup() method (see also here: https://www.confluent.io/blog/data-reprocessing-with-kafka-streams-resetting-a-streams-application/ ). I assume it would need to be done just before the start in this line:

But I am not sure what would be the best way to implement something like this. It doesn't make really sense to do it on all startups, but rather somehow via configuration (system property?). Is there a best way to do something like that in Micronaut? I guess some kind of event "Kafka Streams Prepared" or so would be a nice option but not sure if that's the best way.

@graemerocher
Copy link
Contributor

Micronaut Kafka now supports 2 new events: BeforeKafkaStreamStart and AfterKafkaStreamStart to address this

See https://github.com/micronaut-projects/micronaut-kafka/blob/8ecc4d00dfd39d3b5e5c5ef75cb884db80ba7f3e/kafka-streams/src/test/groovy/io/micronaut/configuration/kafka/streams/listeners/BeforeStartKafkaStreamsListenerImp.java for an example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants