Kafka supports transactional producers for sending messages between topics :
> "Transactional delivery allows producers to send data to multiple partitions such that either all messages are successfully delivered, or none of them are."
However, the user cannot include other types of data (such as an SQL database update) within the transaction because Kafka does not support XA resources - this RFE is to explore ways of achieving the same effect.
For example, if the other type of data is accessed via JDBC then Narayana provides LRCO and CMR [2,3]. This use case should already be supported so the task would be to produce a blog, or otherwise, explaining how to use it with Kafka. It is a variation of a more general strategy where Kafka messages are stored in a database during the transaction (e.g. using a producer interceptor ); it's more general because it means other XA resource types can be included as part of the JTA transaction.
If full ACID is not required then another approach would be to use a compensation based model such as LRA .