-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
PulsarSpout to use consumer.redeliverUnacknowledgedMessages() ? #2210
Comments
@jnioche Yes, that makes total sense. The only reason for this to not use Probably it would even be better to use the method at #2211 so that we can precisely control the redelivery.
When subscribing the unacked messages are automatically re-delivered. The only downside of The most complicated part in the PulsarSpout is the caching of client and consumer instances. This was done to shared resources across threads when users set high parallelism in the topologies. |
We need both redeliverUnacknowledgedMessages() and #2211. The latter could be used for failed messages but we'd still need to keep track of the number of times it failed and a delay to apply. This won't help for messages which were being processed when the JVM died, which is why we need redeliverUnacknowledgedMessages() at init time.
I'm confused. Do you mean that this is what it does even without using redeliverUnacknowledgedMessages? |
Closed as stale and no one worked on it. Please open a new issue if it's still relevant to the maintained versions. |
The PulsarSpout keeps track of the pending messages as well as the failed ones in a queue and map. If the JVM containing a PulsarSpout crashes, this information will get lost with it and the pending or failed messages won't get acked in Pulsar but they also won't have a chance to get retried either when a new instance of the spout is started.
Should we add
consumer.redeliverUnacknowledgedMessages()
to the initialisation of the spout? That way any message which hasn't been acked will get retried?The text was updated successfully, but these errors were encountered: