kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ilja Golshtein <il...@yandex.ru>
Subject unable to set consumer group
Date Wed, 20 Jan 2016 10:35:20 GMT
Hello.

I am trying to create consumer using kafka_python-0.9.5.

I expect that several instances of the script

==
consumer = KafkaConsumer('some-topic',
                         auto_offset_reset='largest',
                         metadata_broker_list=['localhost:9092'],
                         group_id='vasya_group',
                         auto_commit_enable=True)
consumer.set_topic_partitions('some-topic')
while True:
    msg=consumer.next()
    print(msg)
==
would receive different messages, while in reality every instance receives all messages.

What can be done to achieve 
"Consumers label themselves with a consumer group name, and each message published to a topic
is delivered to one consumer instance within each subscribing consumer group" as advertised
in Kafka Documentation?

I am 100% that messages are distributed among several partitions (namely 10).

Thanks.

-- 
Best regards
Ilja Golshtein

Mime
View raw message