常见疑问
1、生产者无法产生消息
kafka.common.FailedToSendMessageException: Failed to send messages after 3 tries.
将slf4j-nop-1.7.21.jar上传到kafka的lib包下
参考文章:http://stackoverflow.com/questions/23903843/apache-kafka-example-error-failed-to-send-message-after-3-tries
常用命令
zk启动
[root@localhost bin]# ./zkServer.sh start
kafka启动
[root@localhost bin]# ./kafka-server-start.sh -daemon ../config/server.properties
创建topic
[root@localhost bin]# ./kafka-topics.sh –create –zookeeper 192.168.21.49:12181 –replication-factor 1 –partitions 1 –topic test
查看当前集群的可用topic
[root@localhost bin]# ./kafka-topics.sh –list –zookeeper 192.168.21.14:12181
SLF4J: Class path contains multiple SLF4J bindings.

本文档主要介绍了Kafka集群和Zookeeper集群中遇到的常见问题以及解决方法,包括生产者发送消息失败的解决方案。同时,详细列举了启动Zookeeper、Kafka服务,创建与管理Kafka topic的相关命令。
最低0.47元/天 解锁文章
1423

被折叠的 条评论
为什么被折叠?



