Skip to content

Commit 95380fc

Browse files
conker84jexp
authored andcommitted
Added images, configuration params descriptions and disabled encryption by default (#140)
1 parent 6fd3c17 commit 95380fc

File tree

11 files changed

+46
-23
lines changed

11 files changed

+46
-23
lines changed

doc/asciidoc/kafka-connect/index.adoc

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
== Kafka Connect
22

3+
image::neo4j-loves-confluent.png[Neo4j Loves Confluent]
4+
5+
36
Kafka Connect, an open source component of Apache Kafka, is a framework for connecting Kafka with external systems such as databases, key-value stores, search indexes, and file systems.
47

58
The Neo4j Streams project provides a Kafka Connect plugin that can be installed into the Confluent Platform enabling:
@@ -17,4 +20,16 @@ Inside the directory `/kafka-connect-neo4j/docker` you'll find a compose file th
1720
include::../../../kafka-connect-neo4j/docker/docker-compose.yml[]
1821
----
1922

20-
include::../../../kafka-connect-neo4j/docker/readme.adoc[]
23+
include::../../../kafka-connect-neo4j/docker/readme.adoc[]
24+
25+
=== Monitor via Confluent Platform UI
26+
27+
The Kafka Monitoring UI can be found at http://<localhost>:9021/management/connect
28+
29+
image::confluent-metrics.jpg[Confluent Importing Metrics]
30+
31+
They show up properly in my topic, and then are added to Neo4j via the sink.
32+
33+
Below you see the data that has been ingested into Neo4j. During my testing I got up to more than 2M events.
34+
35+
image::confluent-imported-data.jpg[Confluent Platform Management]
179 KB
Loading

doc/images/confluent-metrics.jpg

181 KB
Loading
22 KB
Loading

kafka-connect-neo4j/docker/README.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

kafka-connect-neo4j/docker/contrib.sink.avro.neo4j.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"neo4j.server.uri": "bolt://neo4j:7687",
1212
"neo4j.authentication.basic.username": "neo4j",
1313
"neo4j.authentication.basic.password": "connect",
14-
"neo4j.encryption.enabled": false,
1514
"neo4j.topic.cypher.my-topic": "MERGE (p:Person{name: event.name, surname: event.surname, from: 'AVRO'}) MERGE (f:Family{name: event.surname}) MERGE (p)-[:BELONGS_TO]->(f)"
1615
}
1716
}

kafka-connect-neo4j/docker/contrib.sink.string-json.neo4j.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"neo4j.server.uri": "bolt://neo4j:7687",
1515
"neo4j.authentication.basic.username": "neo4j",
1616
"neo4j.authentication.basic.password": "connect",
17-
"neo4j.encryption.enabled": false,
1817
"neo4j.topic.cypher.my-topic": "MERGE (p:Person{name: event.name, surname: event.surname, from: 'JSON'}) MERGE (f:Family{name: event.surname}) MERGE (p)-[:BELONGS_TO]->(f)"
1918
}
2019
}

kafka-connect-neo4j/docker/readme.adoc

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
=== Configuration parameters
2+
3+
You can set the following configuration values via Confluent Connect UI, or via REST endpoint
4+
5+
[cols="3*",options="header"]
6+
|===
7+
|Field|Type|Description
8+
9+
|neo4j.server.uri|String|The Bolt URI
10+
|neo4j.authentication.type|enum[NONE, BASIC, KERBEROS]| The authentication type (default BASIC)
11+
|neo4j.batch.size|Int|The max number of events processed by the Cypher query (default 1000)
12+
|neo4j.batch.timeout.msec|Long|The execution timeout for the cypher query (default 30000)
13+
|neo4j.authentication.basic.username|String| The authentication username
14+
|neo4j.authentication.basic.password|String| The authentication password
15+
|neo4j.authentication.basic.realm|String| The authentication realm
16+
|neo4j.authentication.kerberos.ticket|String| The Kerberos ticket
17+
|neo4j.encryption.enabled|Boolean| If the encryption is enabled (default false)
18+
|neo4j.encryption.trust.strategy|enum[TRUST_ALL_CERTIFICATES,TRUST_CUSTOM_CA_SIGNED_CERTIFICATES,TRUST_SYSTEM_CA_SIGNED_CERTIFICATES]| The Neo4j trust strategy (default TRUST_ALL_CERTIFICATES)
19+
|neo4j.encryption.ca.certificate.path|String| The path of the certificate
20+
|neo4j.connection.max.lifetime.msecs|Long| The max Neo4j connection lifetime (default 1 hour)
21+
|neo4j.connection.acquisition.timeout.msecs|Long| The max Neo4j acquisition timeout (default 1 hour)
22+
|neo4j.connection.liveness.check.timeout.msecs|Long| The max Neo4j liveness check timeout (default 1 hour)
23+
|neo4j.connection.max.pool.size|Int| The max pool size (default 100)
24+
|neo4j.load.balance.strategy|enum[ROUND_ROBIN,LEAST_CONNECTED]| The Neo4j load balance strategy (default LEAST_CONNECTED)
25+
|===
26+
127
=== Build it locally
228

329
Build the project by running the following command:
@@ -84,7 +110,7 @@ http://localhost:9021/management/connect
84110

85111
(or on 0.0.0.0 instead of localhost depending on your Docker environment)
86112

87-
and click to the **Sink** tab. You must find a table just like this:
113+
and click to the **Send data out** (or **Sink** depending on your Confluent Platform Version) tab. You must find a table just like this:
88114

89115
[cols="4*",options="header"]
90116
|===

kafka-connect-neo4j/src/main/kotlin/streams/kafka/connect/sink/Neo4jSinkConnectorConfig.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class Neo4jSinkConnectorConfig(originals: Map<*, *>) : AbstractConfig(config(),
182182
.build())
183183
.define(ConfigKeyBuilder.of(ENCRYPTION_ENABLED, ConfigDef.Type.BOOLEAN)
184184
.documentation(ENCRYPTION_ENABLED)
185-
.importance(ConfigDef.Importance.HIGH).defaultValue(true)
185+
.importance(ConfigDef.Importance.HIGH).defaultValue(false)
186186
.group(GROUP_ENCRYPTION).build())
187187
.define(
188188
ConfigKeyBuilder.of(ENCRYPTION_TRUST_STRATEGY, ConfigDef.Type.STRING)

kafka-connect-neo4j/src/test/kotlin/streams/kafka/connect/sink/Neo4jSinkConnectorConfigTest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import org.junit.Test
55
import org.neo4j.driver.internal.async.pool.PoolSettings
66
import org.neo4j.driver.v1.Config
77
import kotlin.test.assertEquals
8+
import kotlin.test.assertFalse
89
import kotlin.test.assertNull
910
import kotlin.test.assertTrue
1011

@@ -33,7 +34,7 @@ class Neo4jSinkConnectorConfigTest {
3334
val config = Neo4jSinkConnectorConfig(originals)
3435

3536
assertEquals(originals["${Neo4jSinkConnectorConfig.TOPIC_CYPHER_PREFIX}foo"], config.topicMap["foo"])
36-
assertTrue { config.encryptionEnabled }
37+
assertFalse { config.encryptionEnabled }
3738
assertEquals(originals[Neo4jSinkConnectorConfig.SERVER_URI], config.serverUri.toString())
3839
assertEquals(originals[Neo4jSinkConnectorConfig.BATCH_SIZE], config.batchSize)
3940
assertEquals(Config.TrustStrategy.Strategy.TRUST_ALL_CERTIFICATES, config.encryptionTrustStrategy)

0 commit comments

Comments
 (0)