[
https://issues.apache.org/jira/browse/KAFKA-3332?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Vergun updated KAFKA-3332:
---------------------------------
Description:
I have faced issue when consumer can't consume messages from zookeeper chroot.
It was tested on Kafka 0.8.2.2 and Kafka 0.9.0.1
My zookeeper options into server.properties:
$cat config/server.properties | grep zookeeper
zookeeper.connect=localhost:2181/kafka-cluster/kafka-0.9.0.1
zookeeper.session.timeout.ms=10000
zookeeper.connection.timeout.ms=10000
zookeeper.sync.time.ms=2000
I can create successfully a new topic
$kafka-topics.sh --create --partition 3 --replication-factor 1 --topic
__TEST-Topic_1 --zookeeper localhost:2181/kafka-cluster/kafka-0.9.0.1
Created topic "__TEST-Topic_1".
and produce messages into it
$kafka-console-producer.sh --topic __TEST-Topic_1 --broker-list localhost:9092
1
2
3
4
5
In Kafka Manager I see that messages was delivered:
Sum of partition offsets 5
But I can't consume the messages via kafka-console-consumer
$kafka-console-consumer.sh --topic TEST-Topic_1 --zookeeper
localhost:2181/kafka-cluster/kafka-0.9.0.1 --from-beginning
If I configure kafka cluster with zookeeper chroot "/" then everything is ok.
$cat config/server.properties | grep zookeeper
zookeeper.connect=localhost:2181
zookeeper.session.timeout.ms=10000
zookeeper.connection.timeout.ms=10000
zookeeper.sync.time.ms=2000
$kafka-console-producer.sh --topic __TEST-Topic_1 --broker-list localhost:9092
1
2
3
4
5
$kafka-console-consumer.sh --topic TEST-Topic_1 --zookeeper localhost:2181
--from-beginning
1
2
3
4
5
Is it bug or my mistake?
was:
I have faced issue when consumer can't consume messages from zookeeper chroot.
It was tested on Kafka 0.8.2.2 and Kafka 0.9.0.1
My zookeeper options into server.properties:
$cat config/server.properties | grep zookeeper
zookeeper.connect=localhost:2181/kafka-cluster/kafka-0.9.0.1
zookeeper.session.timeout.ms=10000
zookeeper.connection.timeout.ms=10000
zookeeper.sync.time.ms=2000
I can create successfully a new topic
$kafka-topics.sh --create --partition 3 --replication-factor 1 --topic
__TEST-Topic_1 --zookeeper localhost:2181/kafka-cluster/kafka-0.9.0.1
Created topic "__TEST-Topic_1".
and produce messages into it
$kafka-console-producer.sh --topic __TEST-Topic_1 --broker-list localhost:9092
1
2
3
4
5
In Kafka Manager I see that messages was delivered:
Sum of partition offsets 5
But I can't consume the messages via kafka-console-consumer
$kafka-console-consumer.sh --topic TEST-Topic_1 --zookeeper
localhost:2181/kafka-cluster/kafka-0.9.0.1 --from-beginning
If I configure kafka cluster with "/" zookeeper chroot then everything is ok.
$cat config/server.properties | grep zookeeper
zookeeper.connect=localhost:2181
zookeeper.session.timeout.ms=10000
zookeeper.connection.timeout.ms=10000
zookeeper.sync.time.ms=2000
$kafka-console-consumer.sh --topic TEST-Topic_1 --zookeeper localhost:2181
--from-beginning
1
2
3
4
5
Is it bug or my mistake?
> Consumer can't consume messages from zookeeper chroot
> -----------------------------------------------------
>
> Key: KAFKA-3332
> URL: https://issues.apache.org/jira/browse/KAFKA-3332
> Project: Kafka
> Issue Type: Bug
> Components: consumer
> Affects Versions: 0.8.2.2, 0.9.0.1
> Environment: RHEL 6.X, OS X
> Reporter: Sergey Vergun
> Assignee: Neha Narkhede
>
> I have faced issue when consumer can't consume messages from zookeeper
> chroot. It was tested on Kafka 0.8.2.2 and Kafka 0.9.0.1
> My zookeeper options into server.properties:
> $cat config/server.properties | grep zookeeper
> zookeeper.connect=localhost:2181/kafka-cluster/kafka-0.9.0.1
> zookeeper.session.timeout.ms=10000
> zookeeper.connection.timeout.ms=10000
> zookeeper.sync.time.ms=2000
> I can create successfully a new topic
> $kafka-topics.sh --create --partition 3 --replication-factor 1 --topic
> __TEST-Topic_1 --zookeeper localhost:2181/kafka-cluster/kafka-0.9.0.1
> Created topic "__TEST-Topic_1".
> and produce messages into it
> $kafka-console-producer.sh --topic __TEST-Topic_1 --broker-list localhost:9092
> 1
> 2
> 3
> 4
> 5
> In Kafka Manager I see that messages was delivered:
> Sum of partition offsets 5
> But I can't consume the messages via kafka-console-consumer
> $kafka-console-consumer.sh --topic TEST-Topic_1 --zookeeper
> localhost:2181/kafka-cluster/kafka-0.9.0.1 --from-beginning
> If I configure kafka cluster with zookeeper chroot "/" then everything is ok.
> $cat config/server.properties | grep zookeeper
> zookeeper.connect=localhost:2181
> zookeeper.session.timeout.ms=10000
> zookeeper.connection.timeout.ms=10000
> zookeeper.sync.time.ms=2000
> $kafka-console-producer.sh --topic __TEST-Topic_1 --broker-list localhost:9092
> 1
> 2
> 3
> 4
> 5
> $kafka-console-consumer.sh --topic TEST-Topic_1 --zookeeper localhost:2181
> --from-beginning
> 1
> 2
> 3
> 4
> 5
> Is it bug or my mistake?
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)