Skip to content

Commit a2255b8

Browse files
committed
Doc polishing
1 parent d62e307 commit a2255b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/reference/asciidoc/kafka.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1989,9 +1989,9 @@ When a deserializer fails to deserialize a message, Spring has no way to handle
19891989
To solve this problem, version 2.2 introduced the `ErrorHandlingDeserializer2`.
19901990
This deserializer delegates to a real deserializer (key or value).
19911991
If the delegate fails to deserialize the record content, the `ErrorHandlingDeserializer2` returns a `null` value and a `DeserializationException` in a header, containing the cause and raw bytes.
1992-
When using a record-level `MessageListener`, if either the key or value contains a `DeserializationException` header, the container's `ErrorHandler` is called with the failed `ConsumerRecord`; the record is not passed to the listener.
1992+
When using a record-level `MessageListener`, if the `ConsumerRecord` contains a `DeserializationException` header for either the key or value, the container's `ErrorHandler` is called with the failed `ConsumerRecord`; the record is not passed to the listener.
19931993

1994-
Alternatively, you can configure a `failedDeserializationFunction` which is a `BiConsumer<byte[], Headers, T>`.
1994+
Alternatively, you can configure the `ErrorHandlingDeserializer2` to create a custom value by providing a `failedDeserializationFunction` which is a `BiConsumer<byte[], Headers, T>`.
19951995
This function is invoked to create an instance of `T` which is passed to the listener, as normal.
19961996
The raw record value and headers are provided to the function.
19971997
The `DeserializationException` can be found (as a serialized Java object) in headers; see the javadocs for the `ErrorHandlingDeserializer2` for more information.

0 commit comments

Comments
 (0)