KuthumiPepple commented on code in PR #64: URL: https://github.com/apache/camel-k-examples/pull/64#discussion_r931854490
########## generic-examples/kafka/README.md: ########## @@ -1,30 +1,52 @@ -# Kafka Camel K examples +# Camel K with Kafka examples -This example shows how Camel K can be used to connect to a Kafka broker. +These examples show how to connect to a Kafka broker in a Camel K integration. + +You can find more information about Apache Camel and Apache Camel K on the [official Camel website](https://camel.apache.org). + +## Before you begin + +Read the general instructions in the [root README.md file](/README.md) for setting up your environment and the Kubernetes cluster before looking at this example. + +Make sure you've read the [installation instructions](https://camel.apache.org/camel-k/latest/installation/installation.html) for your specific +cluster before starting the example. + +## Additional Requirements for running the examples +**A Kafka broker**: handles the storage and passing of messages. ## Authentication to Kafka -We have a dedicated section to show [how to authenticate Camel K to Kafka](./sasl_ssl/). +To use Kafka with authentication, we have a dedicated section to show [how to authenticate Camel K to Kafka](./sasl_ssl/). \ +For a simple use case without client authentication, continue with this guide. + +## Understanding the example +- [SampleKafkaConsumer.java](./SampleKafkaConsumer.java): contains a route that reads message from a kafka topic and logs the message +- [application.properties](./application.properties): holds properties required to connect to kafka broker and read from topic. ## Simple usage -To run this example first set-up Kafka on your k8s cluster. -A convenient way to do so is by using the Strimzi project, if you are using minikube follow these instructions at https://strimzi.io/quickstarts/minikube/ +To run this example, first set-up Kafka on your k8s cluster. +A convenient way to do so is by using the Strimzi project. Visit https://strimzi.io/quickstarts/ for set-up instructions. For the instructions on the linked site, it will suffice to only apply the Strimzi installation file and provision the kafka cluster. -For convenience create a configmap to contain the properties: +IMPORTANT: The `kafka.host` value in `application.properties` needs to be set to the CLUSTER-IP address of the my-cluster-kafka-bootstrap service in the kafka namespace. To do this run: Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
