Calling seek
within eachMessage
does not abort the current batch
#98
Labels
seek
within eachMessage
does not abort the current batch
#98
In my dead-letter queue plugin, when I fail to send a message to the dead-letter queue, I need to seek back to the failed message in order to re-process it. This works, as on the subsequent fetch, the message will be re-processed. However, the current batch is first completed, which means that any other messages in the batch after the one that fails gets processed twice.
https://github.com/Nevon/kafkajs-dlq/blob/5a6f00c3de75abf71640a88ff564ab5a5691f7a6/src/consumer.integration.spec.js#L149-L163
I would like a way to abort the current batch. Either immediately as an effect of calling
seek
withineachMessage
, or in some other way (perhaps by throwing a specific type of error).The text was updated successfully, but these errors were encountered: