I have an example Spring Boot application saving a document to MongoDB using Spring's MongoRepository. After that, I write a message to a Kafka topic.
What I want is to rollback the MongoDB transaction when the Kafka write fails.
Do I have other options than XA transactions?