0

I'm trying to change the protocol from bolt to bolt+routing in the Kafka Neo4j Connector configuration. However I'm facing the error

"trace":"java.lang.IllegalArgumentException: Invalid address format bolt+routing\n\tat org.neo4j.driver.internal.Scheme.validateScheme(Scheme.java:46)\n\tat org.neo4j.driver.internal.SecuritySettings.createSecurityPlan(SecuritySettings.java:64)\n\tat org.neo4j.driver.GraphDatabase.driver(GraphDatabase.java:138)\n\tat streams.kafka.connect.sink.Neo4jService.<init>(Neo4jService.kt:83)\n\tat streams.kafka.connect.sink.Neo4jSinkTask.start(Neo4jSinkTask.kt:29)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:308)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:199)\n\tat org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:185)\n\tat org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:235)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.-bash-4.3$ ps aux | grep java^C                                             hread.run(Thread.java:748)\n"}

After reviewing somethings and I get confused on Neo4j Drivers. Currently there are 2 neo4j driver: Neo4j JDBC Driver and Neo4j Java Driver. I only see Neo4j JDBC Driver supports bolt+routing, but the Neo4j Java Driver doesn't. I see Sink Connector is using Neo4j Java Driver, wondering how we can use bolt+routing in Sink Connector.

TIA

double-beep
  • 5,031
  • 17
  • 33
  • 41
Tin Nguyen
  • 399
  • 1
  • 6
  • 16
  • It looks like you've answered your own question. You'd have to adapt Sink Connector to use the JBDC driver... no small task. Why not just use the JBDC driver yourself, and bypass Sink Connector? – Tony Chiboucas Apr 02 '21 at 05:06
  • @TonyChiboucas what do you mean 'bypass Sink Connector'? I'm using Kafka Neo4j Connector which is using Neo4j-java-driver instead of Neo4j-jdbc-driver. Their document only mention we can use bolt+routing protocol, but the driver used in their kafka connect lib doesn't support it. That's what I'm confused. – Tin Nguyen Apr 02 '21 at 12:31
  • I mean to suggest not using a packaged connector, and instead connect directly. It does mean you'll wind up with Cypher in your code, but it might be your best option. – Tony Chiboucas Apr 06 '21 at 04:32
  • nvm, neo4j streams team helped me. Using `neo4j` protocol as a replacement for `bolt+routing`. It works like a charm now. – Tin Nguyen Apr 07 '21 at 02:20

0 Answers0