Reputation: 415
I came across https://github.com/neo4j/neo4j/blob/master/community/kernel/src/main/java/org/neo4j/graphdb/event/TransactionData.java which allows to capture data that was changed within the course of a transaction.
My application uses two data stores, postgresql and Neo4j. To revert to a consistent state upon crash/failure, I am hoping to maintain data from this event which could be useful to reconcile data between databases.
However, we are using the neo4j server REST api, and this event is available to using neo4j in embedded mode. Is it possible to get a response similar to 'created_nodes' and 'created_relationships' over rest batch commits?
Upvotes: 1
Views: 195
Reputation: 39925
The TransactionData
instances are only exposed to a TransactionEventHandler
. That is a component to be written in Java (or other JVM language) you can register with your graph database, either in embedded mode or when running as server. TransactionEventHandler
are typically used to implement cross cutting concerns.
Access to TransactionData
is not available using the REST API.
Upvotes: 2