相关疑难解决方法(0)

Kafka服务器配置 - 侦听器与advertised.listeners

要让Kafka运行,您需要在config/server.properties文件中设置一些属性.我不明白有两种设置.

有人可以解释一下监听器和advertised.listeners属性之间的区别吗?

文件说:

listeners:套接字服务器侦听的地址.

advertised.listeners:代理将向生产者和消费者做广告的主机名和端口.

我何时必须使用哪种设置?

amazon-ec2 apache-kafka

40
推荐指数
5
解决办法
4万
查看次数

ERROR向主题发送消息时出错

在kafka中生成消息时,我收到以下错误:

$ bin/kafka-console-producer.sh --broker-list localhost:9092 --topic nil_PF1_P1
hi
hello

[2016-07-19 17:06:34,542] ERROR Error when sending message to topic nil_PF1_P1 with key: null, value: 2 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.
[2016-07-19 17:07:34,544] ERROR Error when sending message to topic nil_PF1_P1 with key: null, value: 5 bytes with error: (org.apache.kafka.clients.producer.internals.ErrorLoggingCallback)
org.apache.kafka.common.errors.TimeoutException: Failed to update metadata after 60000 ms.


$ bin/kafka-topics.sh --describe --zookeeper localhost:2181 --topic nil_PF1_P1
Topic:nil_PF1_P1    PartitionCount:1    ReplicationFactor:1 Configs:
Topic: nil_PF1_P1   Partition: 0    Leader: 2 …
Run Code Online (Sandbox Code Playgroud)

apache-kafka

25
推荐指数
5
解决办法
5万
查看次数

标签 统计

apache-kafka ×2

amazon-ec2 ×1