27 Şubat 2023 Pazartesi

Apache Kafka Connect Neo4JConnector

Örnek
Şöyle yaparız
Properties connectorProperties = new Properties();
connectorProperties.setProperty("name", "neo4j");
connectorProperties.setProperty("connector.class", "streams.kafka.connect.source.Neo4jSourceConnector");
connectorProperties.setProperty("tasks.max", "1");
connectorProperties.setProperty("topic", "some-topic");
connectorProperties.setProperty("neo4j.server.uri", "...");
connectorProperties.setProperty("neo4j.authentication.basic.username", "neo4j");
connectorProperties.setProperty("neo4j.authentication.basic.password", "password");
connectorProperties.setProperty("neo4j.streaming.poll.interval.msecs", "5000");
connectorProperties.setProperty("neo4j.streaming.property", "timestamp");
connectorProperties.setProperty("neo4j.streaming.from", "ALL");
connectorProperties.setProperty("neo4j.source.query",
"MATCH (ts:TestSource) RETURN ts.name AS name, ts.value AS value, ts.timestamp AS timestamp");

Hiç yorum yok:

Yorum Gönder