Skip to content

Acknowledging list of messages in Pulsar consumer java client #7626

@pg2404

Description

@pg2404

My project uses Apache pulsar for distributed messaging. While using the java consumer client I am facing an issue with acknowledgement of multiple messages in a single shot. The java consumer client as of now does not define any method for acknowledging a list of message ids.
I cannot use the cumulative acknowledge in this scenario – as the batch of messages that my consumer client receives requires an ordering based on few pre-defined message metadata – therefore the natural ordering of messages as received from broker is lost at the point where I am in a position to acknowledge the messages. Also looping through list of messages and sending acks per message is too much of a traffic overhead as in my use case I can expect 5000 messages per batch.
For scenarios like this, it would probably help to have a single non-blocking method call for a list of message ids – something similar to : CompletableFuture acknowledgeAsync(List<Message> message); My project uses Apache pulsar for distributed messaging. While using the java consumer client I am facing an issue with acknowledgement of multiple messages in a single shot. The java consumer client as of now does not define any method for acknowledging a list of message ids. I cannot use the cumulative acknowledge in this scenario – as the batch of messages that my consumer client receives requires an ordering based on few pre-defined message metadata – therefore the natural ordering of messages as received from broker is lost at the point where I am in a position to acknowledge the messages. Also looping through list of messages and sending acks per message is too much of a traffic overhead as in my use case I can expect 5000 messages per batch. For scenarios like this, it would probably help to have a single non-blocking method call for a list of message ids – something similar to : CompletableFuture acknowledgeAsync(List> message);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions