The class ContainerProperties
has been moved from org.springframework.kafka.listener.config
to org.springframework.kafka.listener
.
The enum AckMode
has been moved from AbstractMessageListenerContainer
to ContainerProperties
.
setBatchErrorHandler()
and setErrorHandler()
methods have been moved from ContainerProperties
to AbstractMessageListenerContainer
(and AbstractKafkaListenerContainerFactory
).
A new AfterRollbackProcessor
strategy is provided - see the section called “After Rollback Processor” for more information.
The ConcurrentKafkaListenerContainerFactory
can now be used to create/configure any ConcurrentMessageListenerContainer
, not just those for @KafkaListener
annotations.
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.
Batch listeners can optionally receive the complete ConsumerRecords<?, ?>
object instead of a List<ConsumerRecord<?, ?>
.
See the section called “Batch listeners” for more information.
Headers of type MimeType
and MediaType
are now mapped as simple strings in the RecordHeader
value.
Previously, they were mapped as JSON and only MimeType
was decoded, MediaType
could not be decoded.
They are now simple strings for interoperability.
Also, the 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.
The KafkaEmbedded
class and its KafkaRule
interface have need deprecated in favor of the EmbeddedKafkaBroker
and its JUnit 4 EmbeddedKafkaRule
wrapper.
The @EmbeddedKafka
annotation now populates an EmbeddedKafkaBroker
bean instead of the deprecated KafkaEmbedded
.
This allows the use of @EmbeddedKafka
in JUnit 5 tests.
See Section 4.3, “Testing Applications” for more information.