Skip to content

Commit 0031f19

Browse files
conker84jexp
authored andcommitted
Improved the Kafka-Connect-Sink documentation (#128)
* improved the Kafka-Connect-Sink documentation and added the fake data generator * Update readme.adoc
1 parent 4aa4bba commit 0031f19

File tree

1 file changed

+47
-5
lines changed

1 file changed

+47
-5
lines changed

kafka-connect-neo4j/docker/readme.adoc

Lines changed: 47 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
# Build it locally
1+
= Build it locally
22

33
Build the project by running the following command:
44

5-
$ mvn clean install
5+
mvn clean install
66

77
Inside the directory `<neo4j-streams>/kafka-connect-neo4j/target` you'll find a file named `kafka-connect-neo4j-<VERSION>.tar.gz`
88

99

10-
# Configuring the stack
10+
= Configuring the stack
1111

1212
Create a directory `plugins` at the same level of the compose file and unzip the file `kafka-connect-neo4j-<VERSION>.tar.gz` inside it, then start the compose file
1313

14-
$ docker-compose up -d
14+
docker-compose up -d
1515

1616
Create the Sink instance:
1717

@@ -88,4 +88,46 @@ and click to the **Sink** tab. You must find a table just like this:
8888
|my-topic
8989
|===
9090

91-
Now you can send your AVRO data to the `my-topic` topic
91+
= Use the data generator
92+
93+
You can download and use the https://github.com/conker84/neo4j-streams-sink-tester/releases/download/1/neo4j-streams-sink-tester-1.0.jar[neo4j-streams-sink-tester-1.0.jar] in order to generate a sample dataset.
94+
95+
This package sends records to the Neo4j Kafka Sink by using the following in two data formats:
96+
97+
JSON example:
98+
99+
[source,json]
100+
----
101+
{"name": "Name", "surname": "Surname"}
102+
----
103+
104+
AVRO, with the schema:
105+
106+
[source,json]
107+
----
108+
{
109+
"type":"record",
110+
"name":"User",
111+
"fields":[{"name":"name","type":"string"}, {"name":"surname","type":"string"}]
112+
}
113+
----
114+
115+
Please type:
116+
117+
----
118+
java -jar neo4j-streams-sink-tester-1.0.jar -h
119+
----
120+
121+
to print the option list with default values.
122+
123+
In order to choose the data format please use the `-f` flag: `-f AVRO` or `-f JSON` (the default value).
124+
So:
125+
126+
----
127+
java -jar neo4j-streams-sink-tester-1.0.jar -f AVRO
128+
----
129+
130+
Will send data in AVRO format.
131+
132+
For a complete overview of the **Neo4j Steams Sink Tester** please refer to https://github.com/conker84/neo4j-streams-sink-tester[this repo]
133+

0 commit comments

Comments
 (0)