create kafka topic:
-bash-4.2$ ./kafka-topics.sh --create --zookeeper cxln1.c.thelab-240901.internal:2181 --replication-factor 1 --partitions 1 --topic siva_kafkatopic1
WARNING: Due to limitations in metric names, topics with a period (’.’) or underscore (’_’) could collide. To avoid issues it is best to use either, but not both.
Created topic “siva_kafkatopic1”.
producer:
-bash-4.2$ ./kafka-console-producer.sh --broker-list cxln1.c.thelab-240901.internal:6667,cxln4.c.thelab-240901.internal:6667 --topic siva_kafkatopic1
hello welcome to kafka
Consumer:
-bash-4.2$ ./kafka-console-consumer.sh --zookeeper cxln1.c.thelab-240901.internal:2181 --topic siva_kafkatopic1
Using the ConsoleConsumer with old consumer is deprecated and will be removed in a future major release. Consider using the new consumer by passing [bootstrap-server] instead of [zooke
eper].
{metadata.broker.list=cxln1.c.thelab-240901.internal:6667, request.timeout.ms=30000, client.id=console-consumer-12183, security.protocol=PLAINTEXT}
hello welcome to kafka
^CProcessed a total of 1messages