Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

handleMessageBatch - individually acknowledging/deleting upon success #245

Closed
walshe opened this issue Nov 26, 2020 · 3 comments
Closed

Comments

@walshe
Copy link

walshe commented Nov 26, 2020

Question
If I set batchSize to 10, so that I can receive more than one message, how can I individually checkpoint each message so that if message #9 fails I don't end up having to reprocess the forst 8 again ?

screenshots

Additional context
I want to add more throughput to my consumer by using handleMessageBatch. However I want to be able to acknowledge successful processing of messages individually in case there is a failure processing one of the messages in the batch

@guizoxxv
Copy link
Contributor

I had the same doubt. Looking at the code this is not possible but it would be a nice feature.

Meanwhile my solution was to manually delete the processed messages inside handleMessageBatch it one fails.

Here is a gist with an example.

@efiShtain
Copy link
Contributor

@guizoxxv I've added a pull request to support partial batch ack by returning an array of successful messages from handleMessageBatch

you can try and see if it works for you

#255

@nicholasgriffintn
Copy link
Member

#255 has been merged and will be released when the library is next published, which may be after Christmas.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants