Closed
Description
I am trying to use this project to integrate with Hazelcast Jet. It works pretty nicely, well done!
public final class KafkaConnectTest {
private static final String BROKER_URL = "tcp://10.0.0.113";
private static final String TOPIC = "test";
public static void main(String[] args) {
JetInstance jet = Jet.newJetInstance();
Pipeline pipeline = Pipeline.create();
pipeline.readFrom(KafkaConnectSources.connect(kafkaConnectProps()))
.withoutTimestamps()
.map(record -> new String((byte[])record.value()))
.writeTo(Sinks.logger());
JobConfig jobConfig = new JobConfig();
Job job = jet.newJob(pipeline, jobConfig);
job.join();
}
private static Properties kafkaConnectProps() {
Properties properties = new Properties();
properties.setProperty("name", "camel-source-connector");
properties.setProperty("connector.class", "org.apache.camel.kafkaconnector.CamelSourceConnector");
properties.setProperty("camel.source.url", "paho:" + TOPIC + "?brokerUrl=" + BROKER_URL);
return properties;
}
}
There is one thing I don't quite understand: The main artifact (camel-kafka-connector) pulls a number of dependencies which I don't need and I have to manually exclude. Is there any reason for this?
Metadata
Metadata
Assignees
Labels
No labels