-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add dead-letter-policy support to SCSt Pulsar Binder #373
Comments
In this configuration the DLP doesn't apply. But also I tried the following configuration and it also doesn't apply the DLP.
|
@noorkhan-92 You use the native Pulsar DLT feature, which only works with a shared subscription type. By default, the binder uses an exclusive subscription. By changing the configuration below, the DLT works for me.
We are still working through the general DLT feature for the binder across all the subscription types. In the meantime, could you confirm native DLT works for you, after making the above config changes? Thanks! |
@sobychacko Yes |
@sobychacko Shared applying dead-letter-policy, but then it redeliver the message even if it is successfully consumed. |
Can you elaborate on that? I didn't fully understand - that sounds like a bug. |
Sure, on consumer side when the message is consumed the broker redeliver the message again and again until the max-redeliver-count reached. When I debug I have seen that on returning from the following method it goes to some error in the SimpleInstantiationStrategy.java class line no 139 from the dependency (
|
So, you see that the delivery count works as expected, and after the count is exhausted, it is sent to the DLT, correct? But then you see that some error occurs after that? |
Yes the deliver count work as expected and also send message to DLT on exhaustion. There is no error. |
Ok, thanks! We will investigate this. |
@noorkhan-92 I cannot reproduce the scenario, so I need more information about the error that you are running into. For reference, here is a working binder sample. Read this comment before running the sample. As you can see here, when the consumer receives the message, it throws an exception which is handled by the framework and then negatively acknowledged. Then Pulsar will redeliver the message as many times as the redelivery counts in the DLT policy. Once that is exhausted, it is no longer redelivering the message but rather re-routed to the DLT topic. A |
@sobychacko Yes on throwing exception it redeliver the message which is fine. But when the message is successfully consumed without throwing any exception then still the broker redeliver the message redeliver-count times. As you can see in the following testListener method which consume the message successfully but still the broker redeliver the message. |
Thanks for that. That was a bug in which the subscription type was not properly propagated down to the container from the binder. Addressed now through this commit. |
@sobychacko do you mind transferring this issue over the SCSt Pulsar Binder project? |
Closing in favor of spring-cloud/spring-cloud-stream#2830 |
No description provided.
The text was updated successfully, but these errors were encountered: