Repository navigation
Verify DLT partition in batch recovery - #4891
Conversation
|
On 4.1.x and 4.0.x, a |
The batch fallback of `DefaultErrorHandler` and the batch recovery of `DefaultAfterRollbackProcessor` recovered records with the 2-arg `accept()`, so a `DeadLetterPublishingRecoverer` got no consumer and skipped its DLT partition check. For a record on a partition that the DLT does not have, the publication failed and the batch was redelivered forever, while a record listener with the same setup reaches the DLT. Pass the consumer to a `ConsumerAwareRecordRecoverer`, as `FailedRecordTracker` does since spring-projectsGH-1700. As on the record path, a `DeadLetterPublishingRecoverer` subclass that overrides only the 2-arg `accept()` is no longer called on these paths and should override the 3-arg method; the integration test overrides switch to it, as spring-projectsGH-1700 did. Document the change in the reference guide and in the what's new. Signed-off-by: WooSeung Kim <wooseung.dev@gmail.com> Co-authored-by: Soby Chacko <soby.chacko@broadcom.com>
12d5909 to
227dcbf
Compare
|
Thanks @beyondwin! This is merged into We decided not to backport it to 4.1.x/4.0.x. It changes which |
Auto-cherry-pick to
4.1.x&4.0.xThe batch fallback of
DefaultErrorHandlerand the batch recovery ofDefaultAfterRollbackProcessorrecovered records with the 2-argaccept(), so aDeadLetterPublishingRecoverergot no consumer andskipped its DLT partition check. For a record on a partition that the
DLT does not have, the publication failed and the batch was
redelivered forever, while a record listener with the same setup
reaches the DLT.
Pass the consumer to a
ConsumerAwareRecordRecoverer, asFailedRecordTrackerdoes since GH-1700. As on the record path, aDeadLetterPublishingRecoverersubclass that overrides only the2-arg
accept()is no longer called on these paths and shouldoverride the 3-arg method; the integration test overrides switch to
it, as GH-1700 did.