Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
11-27-2019 11:12 AM
Does anyone ever used Neo4j apoc.periodic.repeat function to publish message to kafka? Here is what I have now:
I have a working query to send message to my kafka topic:
CALL streams.publish("my-neo4j-topic", "Hello World from Neo4j!")
However, when I used apoc repeat function:
CALL apoc.periodic.repeat('kafka-only',
'CALL streams.publish("my-neo4j-topic", "Hello World from Neo4j!")', 5)
Nothing happens..
I have checked the log/debug log and can't get any hint. Can anyone help me?
This is my configuration:
kafka.zookeeper.connect=localhost:2181
kafka.bootstrap.servers=localhost:9092
streams.procedures.enabled=true
streams.source.enabled=true
streams.source.schema.polling.interval=10000
dbms.security.procedures.unrestricted=apoc.*
Please provide the following information if you ran into a more serious issue:
11-27-2019 02:17 PM
Can you be more specific on nothing happens? You don't see the messages going to Kafka, or you don't get any results from APOC?
What happens if you call streams.publish() by itself without the APOC?
11-27-2019 06:24 PM
When I use APOC procedure then I don't see the messages getting publish to Kafka topic.
If i call streams.publish() without APOC in that case message is getting published in Kafka topic.
11-29-2019 08:07 AM
Could you try to reproduce with a 3.5.12 setup and appropriate more current apoc + streams versions?
11-29-2019 05:15 PM
Yes, I tried to reproduce with 3.5.12 version and it has same issue.
streams.publish without apoc producer is publishing message in Kafka topic.
CALL streams.publish("my-neo4j-topic", "Hello World from Neo4j!")
Below query with apoc job management procedure is not publishing message in Kafka topic.
CALL apoc.periodic.repeat('kafka-only',
'CALL streams.publish("my-neo4j-topic", "Hello World from Neo4j!")', 5)
12-02-2019 06:11 AM
Thanks @kavitakjava please try with the following jar:
I look forward to your feedback.
Thanks a lot
Andrea
12-02-2019 08:32 AM
Hi Andrea @conker84,
The jar which you provided worked with neo4j-community-3.5.13 and i can see messages published every 5 seconds in the Kafka topic !!
The jar from https://github.com/neo4j-contrib/neo4j-streams/releases/tag/3.5.4 did not worked.
Seems like you have some fixes in ur jar.
Can this be available on github?
Your fix worked! Thank you so much for your help!
Best,
Kavita
12-02-2019 08:35 AM
Yes I fixed the bug in that jar. I'm preparing a PR so it'll be available with the next release.
Thanks a lot for pointing this out!
12-02-2019 08:36 AM
Awesome!
I'm glad that my use case helped to brought up this issue !
Will this fix available for previous releases e.g. 3.4.17 so that we might now have to upgrade the version in production?
12-19-2019 12:40 AM
@kavitakjava sorry for the delay, do you think it's an option upgrade Neo4j to v 3.5.13?
Please lemme know otherwise we have to find an alternative to support you.
Thanks a lot
01-21-2020 08:55 AM
Hi @conker84,
Has this issue fixed got in the latest release? We can upgrade to the latest release in prod.
Thank you!
Best,
Kavita
All the sessions of the conference are now available online