Skip to content

Message unacknowlegment but i can not consume it #22059

Answered by jak78
ThinhLe30 asked this question in Q&A
Discussion options

You must be logged in to vote

Hello @ThinhLe30, and welcome to the community! The behavior you're experiencing might be caused by the default setting of the initial subscription position as Latest. This setting means that the subscription will only deliver messages that are received after the subscription is created.

To modify this behavior, you can opt for the Earliest option in SubscriptionInitialPosition within the ConsumerOptions when creating the consumer. By selecting Earliest, the subscription will instead deliver the oldest messages that have not yet been consumed, starting from the earliest available.

Feel free to try the following:

consumer, err := client.Subscribe(pulsar.ConsumerOptions{
			Topic:            

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@ThinhLe30
Comment options

@jak78
Comment options

Answer selected by ThinhLe30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants