As a websocket consumer I need to set InitialSubscriptionPosition to earliest #22969
Closed
2 tasks done
Labels
type/enhancement
The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Search before asking
Motivation
As a websocket client, I need to subscribe to a persistent topic that has existing messages.
I need to consume all messages, starting from the first (earliest) one, and keep consuming messages as they become available.
Persistent subscription cursor is needed, hence the use of consumer api.
There is no parameter available for this setting shown in the documentation, or in the code that creates the subscription.
There is a similar setting messageId for the Reader endpoint.
But not for the Consumer endpoint.
Solution
Receive a new url parameter "initialSubscriptionPosition", and add the value to the consumer builder using the corresponding java api method.
Alternatives
Use the Reader endpoint: I would really prefer Pulsar to handle the cursor, instead of having to manage that state.
Anything else?
I would be open to implement this myself, if needed.
Thank you very much for your contributions!
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: