This repository serves as a point of reference when developing a streaming application with Memgraph and a message broker such as Kafka. KafkaProducer

memgraph / example-streaming-app

submited by
Style Pass
2021-07-29 12:00:05

This repository serves as a point of reference when developing a streaming application with Memgraph and a message broker such as Kafka.

KafkaProducer represents the source of your data. That can be transactions, queries, metadata or something different entirely. In this minimal example we propose using a special string format that is easy to parse. The data is sent from the KafkaProducer to Kafka under a topic aptly named topic. The Backend implements a KafkaConsumer. It takes data from Kafka, parses it and sends it to Memgraph for graph analysis, feature extraction or storage.

Install Kafka and Memgraph using the instructions in the homonymous directories. Then choose a programming language from the list of supported languages and follow the instructions given there.

The KafkaProducer in ./kafka/producer creates nodes with a label Person that are connected with edges of type CONNECTED_WITH. In this repository we provide a static producer that reads entries from a file and a stream producer that produces entries every X seconds.

Leave a Comment
Related Posts