Java Client examples
You can produce messages to and consume messages from a Kafka cluster using the command line. For most cases however, running Kafka producers and consumers using shell scripts and Kafka’s command line scripts cannot be used in practice. In these cases, native Kafka client development is the generally accepted option. Review these code example to better understand how you can develop your own clients using the Java client library.