0
votes

Kafka: 0.10.1.0 (Client & Server) Java client. Zookeeper: 3.4.6

Setup: Producer publishes messages. Sent messages on topic counted using ./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhost:9093 --topic TEST.TOPIC --time -1

Issue Consumer when polled while subscribing doesn't work but if you manually assign() - it works. There had been a separate thread on same question but no answer. It may be UUID issue but need more details as we are in evaluating phase and details would help.

Consumer Settings: props.put("bootstrap.servers", servers); props.put("enable.auto.commit", ENABLE_AUTO_COMMIT);

    props.put("auto.commit.interval.ms", AUTO_COMMIT_INTERVAL_MS);
    props.put("session.timeout.ms", SESSION_TIMEOUT_MS);
    props.put("group.id", CONSUMER_GROUP_ID);
    props.put("key.deserializer", STRING_DESRIALIZER);
    props.put("value.deserializer", STRING_DESRIALIZER);
    props.put("auto.offset.reset", "earliest");
1
are you using the command line consumer? can you share the consumer configurations?daniel
updated. I am using Java client (KafkaConsumer). When I use subscribe(topics) - doesn't work. assign(topicPartitions) - Works.amit.shipra
do you have the following property set in kafka properties? etc/kafka/server.properties usually. listeners=PLAINTEXT://<ip>:<port> This tells kafka to listen for consumers here in plaintext (vs ssl).daniel
yes. listeners=PLAINTEXT://:9093amit.shipra
Same version for both clients and servers?amethystic

1 Answers

0
votes

Issue was with Version of Kafka.

Switched to 0.10.2.1 (server and client) and subscribe() worked flawlessly.