GitHub user jeffgrunewald created a discussion: Websocket API should support 
cumulative acknowledgement

**Is your feature request related to a problem? Please describe.**
In order to support feature parity with other clients, the WebSocket should 
also be able to cumulatively acknowledge messages up to and including the 
supplied message ID.

**Describe the solution you'd like**
Ideally, the acknowledgement payload that currently only seems to support 
`{"messageId":"CAoQKA=="}` could accept an optional second field specifying 
individual acknowledgement or cumulative acknowledgement. The absence of the 
field could be assumed to equate to individual acknowledgement. As an example, 
the following two options could be accepted to allow for individual 
acknowledgement of a message:
`{"messageId":"CAoQKA=="}` _or_ 
`{"messageId":"CAoQKA==","ackType":"Individual"}`
while the following would be required to acknowledge messages cumulatively:
`{"messageId":"CAoQKA==","ackType":"Cumulative"}`

**Describe alternatives you've considered**
Perhaps a topic-level setting would also work in which case only it would be 
required at topic configuration as with partitioned topics but I image that 
would require more work to support.

**Additional context**
In order to maximize throughput of messages across a WebSocket, particularly 
when the same socket connection is handling acknowledgement, it would be ideal 
to support cumulative acknowledgement to minimize the processing on the cluster 
side by minimizing the number of acknowledgement messages needed to keep data 
flowing to the consumer, while also minimizing the amount of bottlenecking that 
occurs within the socket client itself by not requiring a one-for-one ack 
message to received message.

Thanks very much!


GitHub link: https://github.com/apache/pulsar/discussions/18783

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@pulsar.apache.org

Reply via email to