title: confluent-kafka based consumer in Python does not work
body: <p>Very new to kafka and Avro. I am stuck with a problem and can not seem to figure out what is going wrong here. I had written a producer and consumer of kafka which uses Avro as the serialization format. The producer code is working properly. As after running that code when I run the <code>kafka-avro-console-consumer</code> it give me as following - </p>
  
  <pre><code>bin/kafka-avro-console-consumer --bootstrap-server localhost:9092 --topic test --property schema.registry.url=http://127.0.0.1:8081 --from-beginning
  {"name":{"string":"Hello World!"}}
  {"name":{"string":"Hello World!"}}
  {"name":{"string":"Hello World!"}}
  </code></pre>
  
  <p>However, when I try to do the same using python (following this the most basic <a href="https://github.com/confluentinc/confluent-kafka-python" rel="nofollow noreferrer">example</a> ) I write the following code - </p>
  
  <pre><code>from confluent_kafka import KafkaError
  from confluent_kafka.avro import AvroConsumer
  from confluent_kafka.avro.serializer import SerializerError
  
  
  class AvroConsumerAdapter(object):
  
      def __init__(self, topic='test'):
          self.topic = topic
          self.consumer = AvroConsumer({'bootstrap.servers': 'localhost:9092',
                                        'schema.registry.url': 'http://127.0.0.1:8081',
                                        'group.id': 'mygroup'})
          self.consumer.subscribe([topic])
  
      def start_consuming(self):
          running = True
          while running:
              try:
                  msg = self.consumer.poll(10)
                  if msg:
                      print(msg.value())
                      if not msg.error():
                          print("Here - 1")
                          print(msg.value())
                      elif msg.error().code() != KafkaError._PARTITION_EOF:
                          print("here-2")
                          print(msg.error())
                          running = False
                      else:
                          print('Here-3')
                          print(msg.error())
              except SerializerError as e:
                  print("Message deserialization failed for %s: %s" % (msg, e))
                  running = False
              except Exception as ex:
                  print(ex)
                  running = False
  
          self.consumer.close()
  </code></pre>
  
  <p>This client stays there forever and never prints anything. I am not sure what is wrong here. Can anyone please help me in this. </p>