Skip to content

Issue with SimpleConsumer #44

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
fozzmarc opened this issue Sep 24, 2013 · 1 comment
Closed

Issue with SimpleConsumer #44

fozzmarc opened this issue Sep 24, 2013 · 1 comment

Comments

@fozzmarc
Copy link

Hi,
I'm new to kafka, I'm using kafka-0.8.0
the code looks like

kafka = KafkaClient("localhost", 9092)
consumer = SimpleConsumer(kafka, "my-group", "test")
for message in consumer:
    print message

When runing ,it'll be stuck here

OffsetAndMessage(offset=166799, message=Message(magic=0, attributes=0, key=None, value='{"topic": "test", "content": "test"}'))
Traceback (most recent call last):
  File "run.py", line 8, in <module>
    kfk.recv_message()
  File "/usr/local/websoft/kafka_server_side/kfk.py", line 30, in recv_message
    for message in self.consumer:
  File "build/bdist.linux-x86_64/egg/kafka/consumer.py", line 340, in __iter__
  File "build/bdist.linux-x86_64/egg/kafka/consumer.py", line 161, in _auto_commit
  File "build/bdist.linux-x86_64/egg/kafka/consumer.py", line 145, in commit
  File "build/bdist.linux-x86_64/egg/kafka/client.py", line 290, in send_offset_commit_request
  File "build/bdist.linux-x86_64/egg/kafka/client.py", line 168, in _send_broker_aware_request
  File "build/bdist.linux-x86_64/egg/kafka/conn.py", line 83, in recv
  File "build/bdist.linux-x86_64/egg/kafka/conn.py", line 37, in _consume_response
  File "build/bdist.linux-x86_64/egg/kafka/conn.py", line 51, in _consume_response_iter
Exception: Got no response from Kafka
Exception NameError: "global name 'ConsumerNoMoreData' is not defined" in <generator object __iter_partition__ at 0x11b6190> ignored

Producer is working fine and it never stop, I can get the message from kafka-console client .

@mumrah mumrah closed this as completed in c0d2cac Sep 25, 2013
@mumrah
Copy link
Collaborator

mumrah commented Sep 25, 2013

Indeed that class is missing! Thanks for the bug report

mrtheb pushed a commit to mrtheb/kafka-python that referenced this issue Nov 14, 2013
Also move the exceptions to common instead of util
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants