2. What’s new?

2.1 What’s new in 2.1 Since 2.0

2.1.1 Kafka Client Version

This version requires the 1.0.0 kafka-clients or higher.

2.1.2 JSON Improvements

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.

2.1.3 Container Stopping Error Handlers

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.

2.1.4 Client ID

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.

2.1.5 Logging Offset Commits

By default, logging of topic offset commits is performed with the DEBUG logging level. Starting with version 2.1.2, there is a new property in ContainerProperties called commitLogLevel which allows you to specify the log level for these messages. See the section called “KafkaMessageListenerContainer” for more information.

2.1.6 Migration Guide from 2.0

2.0 to 2.1 Migration.