You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Spring for Apache Kafka project also provides some assistance by means of the `FilteringMessageListenerAdapter`
1462
1462
class, which can wrap your `MessageListener`.
1463
1463
This class takes an implementation of `RecordFilterStrategy` where you implement the `filter` method to signal
1464
-
that a message is a duplicate and should be discarded.
1465
-
1466
-
A `FilteringAcknowledgingMessageListenerAdapter` is also provided for wrapping an `AcknowledgingMessageListener`.
1467
-
This has an additional property `ackDiscarded` which indicates whether the adapter should acknowledge the discarded record; it is `true` by default.
1464
+
that a message is a duplicate and should be discarded. This has an additional property `ackDiscarded` which indicates
1465
+
whether the adapter should acknowledge the discarded record; it is `false` by default.
1468
1466
1469
1467
When using `@KafkaListener`, set the `RecordFilterStrategy` (and optionally `ackDiscarded`) on the container factory and the listener will be wrapped in the appropriate filtering adapter.
1470
1468
@@ -1489,7 +1487,7 @@ When using `@KafkaListener`, set the `RetryTemplate` (and optionally `recoveryCa
1489
1487
The contents of the `RetryContext` passed into the `RecoveryCallback` will depend on the type of listener.
1490
1488
The context will always have an attribute `record` which is the record for which the failure occurred.
1491
1489
If your listener is acknowledging and/or consumer aware, additional attributes `acknowledgment` and/or `consumer` will be available.
1492
-
For convenience, the `RetryingAcknowledgingMessageListenerAdapter` provides static constants for these keys.
1490
+
For convenience, the `RetryingMessageListenerAdapter` provides static constants for these keys.
1493
1491
See its javadocs for more information.
1494
1492
1495
1493
A retry adapter is not provided for any of the batch <<message-listeners, message listeners>> because the framework has no knowledge of where, in a batch, the failure occurred.
0 commit comments