KafkaConsumer#resetToLastCommittedPositions
doesn't work with the default throttled
ack strategy π€·π»ββοΈ
#2301
Labels
Hi π,
? Context
We process records in batch and we want to send only poisoned records to a
dead-letter-queue
in case of failure, not all the records in the batch π .For that we developed a custom failure strategyπ«°to do a retry record per record 1 in which we apply the
dead-letter-queue
's base implementation strategy. To do the retry, we choose to useKafkaConsumer#resetToLastCommittedPositions
(accessed throughKafkaClientService
) that fits perfectly our needs πBut.. sometimes retrying a batch of records also replayed the previous one too, that is where we noticed that the
throttled
acknowledgement strategy was not aware of thatresetToLastCommittedPositions
: the pending acks are not flushed to Kafka.In our case we switched to the
latest
acknowledgement strategy and it's ok for nowπΆ, but it looks incoherent behaviour IMO and could lead to some very bad experiences πππΌ What I would like
Regarding that :
KafkaConsumer#resetToLastCommittedPositions
is public and accessible throughKafkaClientService
)throttled
acknowledgement strategy is the default one and pretty useful (thanks guys π)Would it will be possible to adapt the implementation of
KafkaConsumer#resetToLastCommittedPositions
to update thethrottled
mechanism accordingly ?Seems that the actual partitions revocation mechanism could fit well :
Thx
Footnotes
Switching a batch into records is done with a
PublisherDecorator
thattransformToIterable
the Multi β©The text was updated successfully, but these errors were encountered: