美文网首页
Kafka producer无法发送消息

Kafka producer无法发送消息

作者: 16813153e52b | 来源:发表于2019-06-09 18:39 被阅读0次

    在虚拟机搭建了kafka集群,在集群内使用Shell可以成功发送消息创建Topic。
    但是在外部使用API无法发送消息,但是能创建topic
    具体原因

    Hostname and port the broker will advertise to producers and consumers. If not set, it uses the value for “listeners” if configured. Otherwise, it will use the value returned from java.net.InetAddress.getCanonicalHostName().

    解决方法:

    advertised.listeners=PLAINTEXT://192.168.84.136:9092
    

    相关文章

      网友评论

          本文标题:Kafka producer无法发送消息

          本文链接:https://www.haomeiwen.com/subject/ipinxctx.html