Git Product home page Git Product logo

kafka-neo4j's Introduction

Simple Proof of Concept to show Apache Kafka and Neo4j

Requirements

  • Java 8
  • Gradle
  • Access to Maven packages in the build.gradle
  • Apache Kafka, Apache ZooKeeper, and Neo4j running (Dockerfile coming soon)

Fake Producing data into Kafka

  • Fake authors and posts data is provided in the resources/fake/data.json
  • Producer.java produces the fake data on a particular topics, and key

Getting Started

  • Check out Main.java and the Helpful CLI Commands section below.

Consumers

  • Coming Soon!
  • Test a Consumer via CLI:
kafka-console-consumer --bootstrap-server 127.0.0.1:9092 --topic author_topic --group group_cli --from-beginning

{"id":"A","firstName":"fnameA","lastName":"lnameA"}
{"id":"B","firstName":"fnameB","lastName":"lnameB"}
{"id":"C","firstName":"fnameC","lastName":"lnameC"}

Helpful CLI Commands below

Spawn ZooKeeper, default configuration, on port 2181

zookeeper-server-start config/zookeeper.properties

Spawn Kafka, defaulting configuration, on port 9092

kafka-server-start config/server.properties

Create Topics we need (running locally for 1 replication factor)

Create the Author Topic.

kafka-topics --zookeeper 127.0.0.1:2181 --topic {AUTHOR_TOPIC} --create --partitions 6 --replication-factor 1

Create the Post Topic.

kafka-topics --zookeeper 127.0.0.1:2181 --topic {POST_TOPIC} --create --partitions 6 --replication-factor 1

  • {AUTHOR_TOPIC} - default is author_topic
    • The default key that will be published to is in the form id_{AUTHOR_ID}
  • {POST_TOPIC} - default is post_topic

kafka-neo4j's People

Contributors

wagnerjt avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.