CommonErrorHandler for asyncAcks and AckMode.MANUAL #2668
Unanswered
linus-learns
asked this question in
Q&A
Replies: 2 comments 2 replies
-
It sounds like a bug; a simple MCRE reproducer would be a big help. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Sorry for the late reply, below is a link to a small spring boot project with a test exhibiting the behaviour. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm running a setup with
@KafkaListener
annotated consumers using aConcurrentKafkaListenerContainerFactory
setup withasyncAcks
andAckMode.MANUAL
. I have tried to implement aCommonErrorHandler
for my setup withisAckAfterHandle
set totrue
andseeksAfterHandling
set tofalse
, but the bookkeeping of the deferred acks does not work, as the the ack after the error handler has been invoked and the broken record handled is not done through theackInOrder
method. This causes the consumer to hang if a poison pill appears in the middle of the batch and higher offset commits are waiting in theListenerConsumer
.It appears that the ack for the poison pill is never commited until the consumer get's the shutdown signal, as a rebalance causes the broken record to be fetched by the new partition owner but a restart resolves the issue.
Is this a bug, or should I use a different way of handling my errors given my setup?
Beta Was this translation helpful? Give feedback.
All reactions