neo4j-streams | Neo4j Kafka Integrations , Docs = > | Change Data Capture library
kandi X-RAY | neo4j-streams Summary
kandi X-RAY | neo4j-streams Summary
Neo4j Kafka Integrations, Docs =>
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of neo4j-streams
neo4j-streams Key Features
neo4j-streams Examples and Code Snippets
Community Discussions
Trending Discussions on neo4j-streams
QUESTION
We want to use Neo4J to build a hierarchy (tree-structure) of (product) categories. Our data enters from a Kafka (Sink Connector). We plan to use Neo4J Streams Source to live stream the updates on our category-tree back onto Kafka, using neo4j-4.0.3.
Normally, the - Streams Source - way to go is to specify a pattern and link it to a Kafka topic, as explained here: https://neo4j.com/docs/labs/neo4j-streams/current/#neo4j_streams_source
In order to leverage the power of Neo4J we'd like to send a collection of nodes each time at once. This collection consists of all the nodes on a - query that returns a - path: nodes(path)
. More specifically, such a collection of nodes represents a path from leaf to root.
Two non-working alternatives we could think of:
- Use a pattern definition. From what I understand a pattern seems to be limited to match a single node only (possibly a node with multiple Labels) - https://neo4j.com/docs/labs/neo4j-streams/current/#source-patterns - and hence we can only stream out one node at a time.
- Stream the collection of nodes (on the path) back into a node with a different label, and use that output node label to pattern match {*}. Neo4J being a property oriented graph database, it does not allow me to write 'a collection of nodes' into one node.
To summarize, what we want is to stream out a collection of nodes into each Kafka record. Any suggestions on how we can achieve this?
...ANSWER
Answered 2020-May-13 at 23:19The streams.publish procedure will send any arbitrary data that you can format with Cypher to the topic of your choosing. It's just up to you to format the data as you wish.
I'm imagining something like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install neo4j-streams
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page