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

Added Kafka Consumer Example #625

Closed
wants to merge 1 commit into from

Conversation

stevef1uk
Copy link
Contributor

PR to add a Kafka consumer example along with the application.properties to get it to run
Instructions for running example in comment in example file

@valdar
Copy link
Member

valdar commented Apr 18, 2019

@nicolaferraro and @lburgazzoli where do you think more complex examples belongs?

@nicolaferraro
Copy link
Member

It's ok to provide complex examples here. I think they should have the form of a quickstart, each quickstart in a separate folder, for now under examples, e.g. there's another one for knative under examples/knative.

I'd put this in examples/kafka, including a README doc file that explains how to run it (like the explanation that now is in the comment).

@davsclaus
Copy link
Contributor

Yeah I suggest to keep the small quick examples that we can use for simple demos and whatnot in the examples folder, and then we should start to have either sub-folders with bigger examples or have a different folder where they reside. These bigger examples should have their own readme file, and show practices how developers would develop Camel K projects and so on.

@valdar
Copy link
Member

valdar commented Apr 19, 2019

This can be closed, incorporated the changes in: #632

@stevef1uk stevef1uk closed this Apr 20, 2019
@stevef1uk
Copy link
Contributor Author

Closed as requested

@TruptiJain
Copy link

Hi , I am trying to consumer to apache camel but its not working

@TruptiJain
Copy link

static Properties generateProperties() {

	Properties properties = new Properties();
	properties.put("bootstrap.servers", BOOTSTRAP_SERVERS);

	try {
		properties.put("client.id", InetAddress.getLocalHost().getHostName());
	} catch (Exception e) {
		System.out.println(e);
	}
	properties.put("acks", "all");
	properties.put("key.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
	properties.put("value.deserializer", "org.apache.kafka.common.serialization.StringDeserializer");
	properties.put("group.id", "cbmconsu");
	properties.put("security.protocol", "SSL");
	properties.put("ssl.protocol", "SSL");
	properties.put("ssl.key.password", "password");
	properties.put("ssl.keystore.location", "cbmconsu.p12");
	properties.put("ssl.keystore.password", "password");
	properties.put("ssl.truststore.location", "ciscoprodtruststore.jks");
	properties.put("ssl.truststore.password", "password");
	properties.put("topic.name", TOPIC);

	return properties;
}

its giving me error incorrect path.. but all my values look appropriate. Can anyone help

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 this pull request may close these issues.

6 participants