Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The camel-kafka-connector artifacts pulls number of dependencies #9

Closed
jerrinot opened this issue Dec 8, 2019 · 3 comments · Fixed by #10
Closed

The camel-kafka-connector artifacts pulls number of dependencies #9

jerrinot opened this issue Dec 8, 2019 · 3 comments · Fixed by #10

Comments

@jerrinot
Copy link
Contributor

jerrinot commented Dec 8, 2019

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?

@oscerd
Copy link
Contributor

oscerd commented Dec 8, 2019

This is something we still need to optimize. Thanks for reporting this and for your feedback :-)

@jerrinot
Copy link
Contributor Author

jerrinot commented Dec 8, 2019

That's what I thought! Would you accept a Pull Request marking them as provided (Is this the right scope? I never know) + related changes to make the Integration Tests working again (they currently rely on this)

@oscerd
Copy link
Contributor

oscerd commented Dec 8, 2019

I think it should be fine. Thanks for your time!

jerrinot added a commit to jerrinot/camel-kafka-connector that referenced this issue Dec 8, 2019
@oscerd oscerd closed this as completed in #10 Dec 8, 2019
orpiske pushed a commit to orpiske/camel-kafka-connector that referenced this issue Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants