ContainerProperties has been moved from
AckMode has been moved from
setErrorHandler() methods have been moved from
AfterRollbackProcessor strategy is provided - see the section called “After Rollback Processor” for more information.
ConcurrentKafkaListenerContainerFactory can now be used to create/configure any
ConcurrentMessageListenerContainer, not just those for
See the section called “Container factory” for more information.
A new container property
missingTopicsFatal has been added.
See the section called “KafkaMessageListenerContainer” for more information.
ConsumerStoppedEvent is now emitted when a consumer terminates.
See the section called “Thread Safety” for more information.
Batch listeners can optionally receive the complete
ConsumerRecords<?, ?> object instead of a
See the section called “Batch listeners” for more information.
SeekToCurrentErrorHandler can now recover (skip) records that keep failing, and will do so after 10 failures, by default.
They can be configured to publish failed records to a dead-letter topic.
You can now override the
autoStartup properties of the listener container factory by setting properties on the annotation.
You can now add configuration to determine which headers (if any) are copied to a reply message.
See the section called “@KafkaListener Annotation” for more information.
You can now use
@KafkaListener as a meta-annotation on your own annotations.
See the section called “@KafkaListener as a Meta Annotation” for more information.
It is now easier to configure a
See the section called “@KafkaListener @Payload Validation” for more information.
Headers of type
MediaType are now mapped as simple strings in the
Previously, they were mapped as JSON and only
MimeType was decoded,
MediaType could not be decoded.
They are now simple strings for interoperability.
DefaultKafkaHeaderMapper has a new method
addToStringClasses allowing the specification of types that should be mapped using
toString() instead of JSON.
See Section 4.1.6, “Message Headers” for more information.
KafkaEmbedded class and its
KafkaRule interface have need deprecated in favor of the
EmbeddedKafkaBroker and its JUnit 4
@EmbeddedKafka annotation now populates an
EmbeddedKafkaBroker bean instead of the deprecated
This allows the use of
@EmbeddedKafka in JUnit 5 tests.
See Section 4.3, “Testing Applications” for more information.
You can now provide type mapping information using producer/consumer properties.
New constructors are available on the deserializer to allow overriding the type header information with the supplied target type.
The JsonDeserializer will now remove any type information headers by default.
See Section 4.1.5, “Serialization/Deserialization and Message Conversion” for more information.
The streams configuration bean must now be a
KafkaStreamsConfiguration object instead of a
StreamsBuilderFactoryBean has been moved from package
When a transaction is started by the listener container, the
transactional.id is now the
transactionIdPrefix appended with
This is to allow proper fencing of zombies as described here.