The Spring for Apache Kafka project now requires Spring Framework 5.0 and Java 8.
You can now annotate @KafkaListener
methods (and classes, and @KafkaHandler
methods) with @SendTo
.
If the method returns a result, it is forwarded to the specified topic.
See the section called “Forwarding Listener Results using @SendTo” for more information.
Message listeners can now be aware of the Consumer
object.
See the section called “Message Listeners” for more information.
Rebalance listeners can now access the Consumer
object during rebalance notifications.
See the section called “Rebalance Listeners” for more information.
For convenience a test class level @EmbeddedKafka
annotation is provided with the purpose to register KafkaEmbedded
as a bean.
See Section 4.3, “Testing Applications” for more information.
==== After rollback processing
Starting with version 2.0.5, a new AfterRollbackProcessor
strategy is provided - see the section called “After Rollback Processor” for more information.
When a transaction is started by the listener container, the transactional.id
is now the transactionIdPrefix
appended with <group.id>.<topic>.<partition>
.
This is to allow proper fencing of zombies as described here.