![]() ![]() You might get an error message like this when starting a new producer: .KafkaException: Failed to construct kafka producerĪt .producer.KafkaProducer.(KafkaProducer.java:433)Īt .producer.KafkaProducer.(KafkaProducer.java:291)Īt .(BaseProducer.scala:40)Īt $.main(ConsoleProducer.scala:49)Īt (ConsoleProducer.scala)Ĭaused by: : Could not find a 'KafkaClient' entry in the JAAS configuration. $ /opt/bitnami/kafka/bin/kafka-console-producer.sh -broker-list SERVER-IP:9092 nfig /opt/bitnami/kafka/config/producer.properties -topic testĬollect and display the first message in the consumer: $ /opt/bitnami/kafka/bin/kafka-console-consumer.sh -bootstrap-server localhost:9092 -topic test nfig /opt/bitnami/kafka/config/consumer.properties -from-beginning Remember to replace SERVER-IP with your server’s public IP address. Start a new producer on the same Kafka server and generates a message in the topic. ![]() ![]() The -replication-factor parameter indicates how many servers will have a copy of the logs, and the -partitions parameter controls the number of partitions that will be created for the topic. To publish and collect your first message, follow these instructions:Įxport the authentication configuration: $ export KAFKA_OPTS=".config=/opt/bitnami/kafka/config/kafka_nf"ĭeclare a new topic with a single partition and only one replica: $ /opt/bitnami/kafka/bin/kafka-topics.sh -create -zookeeper SERVER-IP:2181 -replication-factor 1 -partitions 1 -topic test ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |