This version requires the 1.0.0 kafka-clients
or higher.
Note | |
---|---|
The 1.1.x client is supported, with version 2.1.5, but you will need to override dependencies as described in Appendix A, Override Dependencies to use the 1.1.x kafka-clients. The 1.1.x client will be supported natively in version 2.2. |
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.5, “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.8, “Handling Exceptions” for more information.
The listener containers now have pause()
and resume()
methods (since version 2.1.3).
See Section 4.1.4, “Pausing/Resuming Listener Containers” for more information.
Starting with version 2.1.3, stateful retry can be configured; see the section called “Stateful Retry” 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.
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.
Starting with version 2.1.3, one of the @KafkaHandler
s on a class-level @KafkaListener
can be designated as the default.
See the section called “@KafkaListener on a Class” for more information.
Starting with version 2.1.3, a subclass of KafkaTemplate
is provided to support request/reply semantics.
See the section called “ReplyingKafkaTemplate” for more information.
Version 2.1.3 introduced the ChainedKafkaTransactionManager
see the section called “ChainedKafkaTransactionManager” for more information.
Starting with version 2.1.6, a new AfterRollbackProcessor
strategy is provided - see the section called “After Rollback Processor” for more information.