Clone the Git repository
Clone the repository containing the Java code for the producer and consumer applications into your development environment:
git clone email@example.com:redhat-cloud-services-tmm/kafka-tutorial.git kafka-tutorial
Under the apps directory, this repository contains two Java applications: one that acts as a Kafka producer (song-app) and another that acts as a Kafka consumer (song-indexer-app). These applications use MicroProfile Reactive Messaging to abstract away the specifics of the Kafka client library using Channels and Emitters.
Explore the code and you will see the Kafka and channel configurations in the application.properties. The Java API for RESTful Web Services (JAX-RS) is used to expose REST APIs that allow HTTP clients to send requests that produce messages to Kafka and that stream consumed events back to the HTTP client.