Do your event streams use connected-data domains such as fraud detection, live logistics routing, or predicting network outages? How can you maintain the analysis and leverage those connections real-time?
Graph databases differ from traditional, tabular ones in that they treat connections between data as first class citizens. This means they are optimized for detecting and understanding these relationships – providing insight at speed and at scale.
By combining event streams from Kafka along with the power of the Neo4j graph database for interrogating and investigating connections, you make real-time, event-driven intelligent insight a reality.
Neo4j Streams integrates Neo4j with Apache Kafka event streams, to serve as a source of data, for instance Change Data Capture or a sink to ingest any kind of Kafka event into your graph. In this session we’ll show you how to get up and running with Neo4j Streams to show you how to sink and source between graphs and streams.
Supercharge Your Real-time Event Processing with Neo4j's Streams Kafka Connector | Ljubica Lazarevic, Neo4j
1. Neo4j, Inc. All rights reserved 2021
Neo4j, Inc. All rights reserved 2021
1
Supercharge your real-time event
processing with Neo4j's Streams
Kafka Connector
Lju Lazarevic
Developer Relations
@ellazal
2. Neo4j, Inc. All rights reserved 2021
An introduction to Neo4j
2
What is Neo4j?
• A natively-built, property graph DB
• ACID-compliant DBMS
• Analytical & transactional workloads
• Cypher query language
2
Why is different to relational databases?
• Joins on write - avoid SQL join pain!
• Performant for connected data queries
• Database size ≠ query speed
3. Neo4j, Inc. All rights reserved 2021
3
You may have come across...
• ICIJ Panama Papers
• NASA’s Lessons Learned DB
• CovidGraph
And you’ve probably been using:
• Recommendations engines
• IT & network management
• Fraud detection
• Social network graphs
actors movies
actor_movie
Actor Movie
ACTED_IN
4. Neo4j, Inc. All rights reserved 2021
Neo4j + Apache Kafka = Magic!
Imagine easier, performant, event driven…
• IT & network incident management
• Fraud detection
• Product recommendation
5. Neo4j, Inc. All rights reserved 2021
Connecting Apache Kafka to Neo4j
6. Neo4j, Inc. All rights reserved 2021
Connecting Apache Kafka to Neo4j
Ways to
connect
Neo4j Connector for Apache
Kafka (aka Neo4j Streams)
Kafka-Connect Plugin
7. Neo4j, Inc. All rights reserved 2021
Connecting Apache Kafka to Neo4j
Ways to
connect
Neo4j Connector for Apache
Kafka (aka Neo4j Streams)
Kafka-Connect Plugin
Differences
Plugin installed on database
server
Plugin installed on Confluent
server/Kafka server
8. Neo4j, Inc. All rights reserved 2021
Connecting Apache Kafka to Neo4j
Ways to
connect
Neo4j Connector for Apache
Kafka (aka Neo4j Streams)
Kafka-Connect Plugin
Differences
Plugin installed on database
server
Plugin installed on Confluent
server/Kafka server
Modes
Sink Sink
Source
Source in active
development
Procedures
9. Neo4j, Inc. All rights reserved 2021
Connecting Apache Kafka to Neo4j
Ways to
connect
Neo4j Connector for Apache
Kafka (aka Neo4j Streams)
Kafka-Connect Plugin
Differences
Plugin installed on database
server
Plugin installed on Confluent
server/Kafka server
Modes
Sink Sink
Source Source in active development
Procedures
Database
setup
Neo4j Server
Neo4j Server, Neo4j Aura
(Cloud)
10. Neo4j, Inc. All rights reserved 2021
Getting started with Neo4j Streams
• Installation
◦ Download the latest jar and copy into
the plugins folder
• Setup connection configuration, including:
◦ Kafka server details
◦ Buffer memory, batch sizes, records
to pull, group ID, etc.
◦ Enable sink/source/procedures
• For sink:
◦ Cypher template
◦ Change Data Capture
◦ Pattern extraction (JSON/AVRO)
◦ Create/Update/Delete
• For source: topic,nodes, rels
11. Neo4j, Inc. All rights reserved 2021
Getting started with Kafka Connect
• Installation
◦ Confluent Hub client
◦ Download and extract to plugins dir
• Set configuration for sink - options
◦ Cypher template
◦ Change Data Capture
◦ Pattern extraction (JSON/AVRO)
◦ Create/Update/Delete
12. Neo4j, Inc. All rights reserved 2021
Where do I find out more?
Guides and content
• Neo4j streams home page: neo4j.com/labs/kafka/
• Confluent Neo4j sink connector: confluent.io/hub/neo4j/kafka-connect-
neo4j
• Neo4j + Apache Kafka YouTube playlist: dev.neo4j.com/kafka-playlist
Other questions? Come say hello!
• Forum: dev.neo4j.com/forum
• Discord: dev.neo4j.com/chat
13. Neo4j, Inc. All rights reserved 2021
Neo4j, Inc. All rights reserved 2021
Ljubica Lazarevic
Developer Relations
@ElLazal
lju@neo4j.com
Join the conversation at dev.neo4j.com/forum
Come say hello on Discord at dev.neo4j.com/chat