Java program for producing and consuming messages from Kafka