neo4jspring-data-neo4jjtaxa

Does Neo4j still support XA transactions?


I use spring boot and neo4j for my project. SDN(spring data neo4j) as a data access layer. Recently I faced a problem where I need cross-store persistence, I need to update data in both neo4j and oracle database. So standard way to do that is XA distributed transactions. Any resources I looked up on integrating neo4j with JTA are old, and recently I found out this on SDN reference page: "Neo4j is dropping XA support and therefore SDN does not provide any capability for cross-store persistence"

link: https://docs.spring.io/spring-data/neo4j/docs/5.1.10.RELEASE/reference/html/

My question is, can anyone provide information about the state of XA transaction support by neo4j, or has anyone tried to use neo4j with JTA transaction manager in a global distributed transaction?


Solution

  • In most cases folks now use federation on the application architecture side, e.g. with streaming solutions and don't rely on XA as such as most NOSQL databases don't support them either. All the other spring data projects don't support it either, most recommend an outbox pattern with a message broker.

    So a common pattern today is to use Change Data Capture (CDC) to trigger follow up changes in a dependent database.

    The drop of XA was because none of our customers used it and it was a huge chunk of codebase to be maintained. We also dropped transactional lucene integration which was one of the original reasons we added it.