Search code examples
apache-kafka-streams

Kafka Streams - Retrying a message


I have a Kafka stream app that has an external dependency. In the case the dependency is not available, I want to reprocess the message(s) later. I can't control the offset since the streams are doing it internally. What is the best was to accomplish this?


Solution

  • You would need to put the message into a store, and later put it out of the store and retry.

    You can do the retry either during regular processing or by scheduling a punctuation.

    Check out the docs for more details: https://docs.confluent.io/current/streams/developer-guide/processor-api.html#defining-a-stream-processor