Skip to content

Possible Message Loss #58

Closed
Closed

Description

@sschepens

Expected behavior

Pulsar should never loose messages.

Actual behavior

It seems to me that now, when this condition returns false we have message loss.
Consumer receives a message and discards it, Broker considers it belongs to that Consumer, it will never redeliver it unless it disconnects.
Shouldn't Consumer ask for redelivery of the message instead of discarding it?

Activity

  1. merlimat commented on Oct 12, 2016

    @merlimat
    Contributor

    I wouldn't characterize this as "message loss", since even if the particular message could be stuck, it would not be deleted until a consumer acknowledges it. So, reconnecting the consumer would unblock it.

    I'm also not convinced that the condition can actually happen. Based on the code there would need to be these conditions :

    1. Use receiveAsync()
    2. Disable consumer prefetch queue
    3. We receive a message but we don't have a callback waiting for it

    I'm not sure how if this can happen given that:

    1. If application used receiveAsync() then we would have a callback waiting
    2. reciveAsync() request cannot be cancelled
    3. When prefetch queue is 0, the consumer would have requested 1 single message from the broker, and timeout would not be allowed

    To conclude, we could trigger the re-delivery of the ignored message, though it would be good to understand under which circumstances that condition can happen.

  2. ivankelly commented on Aug 30, 2018

    @ivankelly
    Contributor

    @sschepens has this happened again?

  3. ivankelly commented on Dec 5, 2018

    @ivankelly
    Contributor

    Closing due to lack of activity.

  4. added a commit that references this issue on May 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions