Kafka manual ackMode MANUAL_IMMEDIATE what if not acknowledge

ぐ巨炮叔叔 提交于 2021-02-11 13:53:34

问题


I use Spring KafKa anf I set ackMode to MANUAL_IMMEDIATE

props.setAckMode(AbstractMessageListenerContainer.AckMode.MANUAL_IMMEDIATE);

the scenario is that for some reason my app could not acknowledge (acknowledgment.acknowledge()) and just miss it without exception.

1- How can I set consumer retry for missed message 2- How configure to call a function after max retry count that I configured reached


回答1:


See the documentation about SeekToCurrentErrorHandlers.

When the listener throws an exception, the error handler will perform the necessary seeks and re-fetch the record. You can set the number of attempts before giving up.

There is also a DeadLetterPublishingRecoverer which can be used to send the failed record to another topic.



来源:https://stackoverflow.com/questions/54530309/kafka-manual-ackmode-manual-immediate-what-if-not-acknowledge

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!