0

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");
8
  • are you using the command line consumer? can you share the consumer configurations? Commented May 11, 2017 at 17:11
  • updated. I am using Java client (KafkaConsumer). When I use subscribe(topics) - doesn't work. assign(topicPartitions) - Works. Commented May 11, 2017 at 17:34
  • 1
    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). Commented May 11, 2017 at 17:39
  • yes. listeners=PLAINTEXT://:9093 Commented May 11, 2017 at 17:44
  • 1
    Same version for both clients and servers? Commented May 12, 2017 at 6:07

1 Answer 1

0

Issue was with Version of Kafka.

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.