0
卡夫卡服務器被配置有以下的端口號(從server.properties)的路徑卡夫卡:我可以在動物園管理員端口號後加一條路徑嗎?
zookeeper.connect=xxxxx007:2181/kafka
的java的生產者代碼:
Properties props = new Properties();
props.put("serializer.class", "kafka.serializer.StringEncoder");
props.put("metadata.broker.list", "xxxxx007:9092");
生產者填充主題如果代理省略/卡夫卡
生產者獲得NumberFormatException異常時的代理人/ KAFA
Properties props = new Properties();
props.put("serializer.class", "kafka.serializer.StringEncoder");
props.put("metadata.broker.list", "xxxxx007:9092/kafka");
java.lang.NumberFormatException: For input string: "9092/kafka"
的java的消費者掛起(不返回任何數據),如果動物園管理員連接包含/卡夫卡
Properties props = new Properties();
props.put("zookeeper.connect", "xxxxx007:2181/kafka");
的java的消費者變得異常,如果動物園管理員連接省略/ kakfa
Properties props = new Properties();
props.put("zookeeper.connect", "xxxxx007:2181");
Exception in thread "main" kafka.common.ConsumerRebalanceFailedException: group1_BFTSLBHW0000RGU-1397591737558-f75b6658 can't rebalance after 4 retries
at kafka.consumer.ZookeeperConsumerConnector$ZKRebalancerListener.syncedRebalance(ZookeeperConsumerConnector.scala:428)
at kafka.consumer.ZookeeperConsumerConnector.kafka$consumer$ZookeeperConsumerConnector$$reinitializeConsumer(ZookeeperConsumerConnector.scala:718)
at kafka.consumer.ZookeeperConsumerConnector.consume(ZookeeperConsumerConnector.scala:209)
at kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:80)
at kafka.javaapi.consumer.ZookeeperConsumerConnector.createMessageStreams(ZookeeperConsumerConnector.scala:92)
at kafka.examples.TitaniumConsumer.main(TitaniumConsumer.java:73)
使用'zkCli.sh',您可以通過'create/kafka'「'創建路徑。 – toppur