Hi,

I wrote a small python script to consume messages from kafka.

The consumer is defined as follows:
kafka = KafkaConsumer('my-replicated-topic',
                       metadata_broker_list=['localhost:9092'],
                       group_id='my_consumer_group',
                       auto_commit_enable=True,
                       auto_commit_interval_ms=30 * 1000,
                       auto_offset_reset='smallest')

But when I start 2 consumers simultaneously both receive all messages from the 
topic.
I would expect to have 1 consumer about half the number of messages and the 
other the rest.

How can I arrange this?

Regards Hans-Peter

This e-mail and the documents attached are confidential and intended solely for 
the addressee; it may also be privileged. If you receive this e-mail in error, 
please notify the sender immediately and destroy it. As its integrity cannot be 
secured on the Internet, Atos’ liability cannot be triggered for the message 
content. Although the sender endeavours to maintain a computer virus-free 
network, the sender does not warrant that this transmission is virus-free and 
will not be liable for any damages resulting from any virus transmitted. On all 
offers and agreements under which Atos Nederland B.V. supplies goods and/or 
services of whatever nature, the Terms of Delivery from Atos Nederland B.V. 
exclusively apply. The Terms of Delivery shall be promptly submitted to you on 
your request.

Reply via email to