如果javaapi长时间消费不到数据

如果javaapi长时间消费不到数据,需要在kafka集群中的server.properties配置如下代码:

# Hostname the broker will advertise to producers and consumers. If not set, i$ # value for "host.name" if configured. Otherwise, it will use the value retur$

# java.net.InetAddress.getCanonicalHostName().

advertised.host.name=192.168.146.104

# The port to publish to ZooKeeper for clients to use. If this is not set, # it will publish the same port that the broker binds to.

advertised.port=9092

猜你喜欢

转载自www.cnblogs.com/hdfs/p/9972188.html