Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible Message Loss #58

Closed
sschepens opened this issue Oct 12, 2016 · 3 comments
Closed

Possible Message Loss #58

sschepens opened this issue Oct 12, 2016 · 3 comments

Comments

@sschepens
Copy link
Contributor

sschepens commented Oct 12, 2016

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?

@merlimat
Copy link
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.

sijie pushed a commit to sijie/pulsar that referenced this issue Mar 4, 2018
@ivankelly
Copy link
Contributor

@sschepens has this happened again?

@ivankelly
Copy link
Contributor

Closing due to lack of activity.

hrsakai pushed a commit to hrsakai/pulsar that referenced this issue Dec 10, 2020
### Motivation

- Add some test cases as follows:

    - TestConsumer_EventTime
    - TestNonPersistentTopic
    - TestConsumer_Flow

- Fix consumer connection closed
- Add `pprof` for debug project
- Fix `flow` command logic
hangc0276 pushed a commit to hangc0276/pulsar that referenced this issue May 26, 2021
add kop version and git sha support. and print the version out when KafkaProtocolHandler start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants