0
votes

Hi We are using Spring kafka 1.3.3 and our app is consume - process - publish pipeline.

How can we handle retry and seek backs if any failure in the pipeline at produce phase. Ex: app is consuming messages, process them and publish into another topic in async fashion. But if there is any error in publishing

  1. How can i retry publishing failed message.

  2. If the message sending is failed even after retries how can i seek back my consumer to the previous offset ? because by then my consumer position will be some where ahead in the log.

  3. How can acknowledge the message in producer call back when the message is successfully produced.

1

1 Answers

0
votes

It's easier with newer releases because you have direct access to the Consumer, but with 1.3.x you can implement ConsumerSeekAware - see the documentation. You have to perform the seek on the listener thread because the Consumer is not thread-safe.