The StringJsonMessageConverter
and JsonSerializer
now add type information in Headers
, allowing the converter and JsonDeserializer
to create specific types on reception, based on the message itself rather than a fixed configured type.
See Section 4.1.4, “Serialization/Deserialization and Message Conversion” for more information.
Container Error handlers are now provided for both record and batch listeners that treat any exceptions thrown by the listener as fatal; they stop the container. See Section 4.1.7, “Handling Exceptions” for more information.
Starting with version 2.1.1, it is now possible to set the client.id
prefix on @KafkaListener
.
Previously, to customize the client id, you would need a separate consumer factory (and container factory) per listener.
The prefix is suffixed with -n
to provide unique client ids when using concurrency.