neo4j-streams icon indicating copy to clipboard operation
neo4j-streams copied to clipboard

Add timestamp+incrementing Kafka Connect Neo4j Connector

Open viveksaran71 opened this issue 3 years ago • 0 comments

Neo4j Source connector (a Kafka Connect plugin) uses timestamp parameter to figure out the new/updated entities. Every Neo4j entity must have this parameter. The Source connector retrieves based on the neo4j.streaming.from parameter. The default value is NOW, which means that all the Neo4j entities with a timestamp greater than NOW will be retrieved and sent to Kafka. This behavior happens every neo4j.streaming.poll.interval.msecs, causing the duplication.

It is my understanding that the Neo4j Source connector has been implemented similar to Confluent’s JDBC Source Connector. There was an option to retrieve Neo4j entities using either timestamp or incrementing or both (timestamp+incrementing) of these methods combined. However, only the timestamp option has been implemented, causing a situation that it is creating duplicates for some customers.

There could be a problem implementing the incrementing feature because of Neo4j's internal structure, as it can’t provide a real unique field. Creating this GH issue anyway, for possible internal discussion and for figuring out a solution.

Thanks for your help!

viveksaran71 avatar Jan 26 '22 15:01 viveksaran71