-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Search before asking
- I searched in the issues and found this issue which was closed as stale
Motivation
Context and additional context
The deadLetterPolicy was implemented before negativeAcknowledgement was an option, which meant that the client had to rely on ackTimeout to result in redelivery / DLQ. However, now that negativeAck is available, we should not default to using the 30s ackTimeout, since it can cause cascading redeliveries when an application takes longer than 30s to process a message. Additionally, the behavior is inconsistent by ordering in the ConsumerBuilder:
consumerBuilder
.ackTimeout(0, TimeUnit.MILLISECONDS)
.deadLetterPolicy(DeadLetterPolicy.builder().build())
.subscribe()
vs
consumerBuilder
.deadLetterPolicy(DeadLetterPolicy.builder().build())
.ackTimeout(0, TimeUnit.MILLISECONDS)
.subscribe()
Option 1 results in ackTimeout of 30s, despite disabling it explicitly, while option 2 does disable ackTimeout.
Solution
I would like to remove the default ackTimeout set here. This was discussed already here
Alternatives
If changing the default is not a viable solution, then we could add a flag in the ConsumerBuilder that denotes when ackTimeout has been set by the user and prevent the default from taking effect in this case, which was discussed already here
Anything else?
No response
Are you willing to submit a PR?
- I'm willing to submit a PR!