Python Azure EventHub Reader. RRS feed

  • Question

  • python version: Python3 

    packages :


    Project requirement(objective):

    1.Read the contents (messages) from  Eventhub using python.

    I am able to write messages in Eventhub through Azure web console and python code using azure.servicebus.ServiceBusService module.

    but not able to read the content of azure EventHub.

    When I tried following code example by replacing tokens with appropriate values.

    execution of above code cause following error.

    2018-01-24 17:00:36,675 eventhubs    INFO     eventhubs.pycli-838141af: created the event hub client
    2018-01-24 17:00:36,677 eventhubs    INFO     eventhubs.pycli-838141af: on_reactor_init
    2018-01-24 17:00:36,677 eventhubs    INFO     eventhubs.pycli-838141af: client starts address=XXXX
    Traceback (most recent call last):
      File "", line 53, in <module>
        .subscribe(MyReceiver("1"), CONSUMER_GROUP, "0", OFFSET) \
      File "/usr/local/lib/python3.5/dist-packages/eventhubs-0.1.0-py3.5.egg/eventhubs/", line 64, in run
      File "/usr/lib/python3/dist-packages/proton/", line 133, in run
        while self.process(): pass
      File "/usr/lib/python3/dist-packages/proton/", line 156, in process
      File "/usr/lib/python3/dist-packages/proton/", line 152, in _check_errors
        _compat.raise_(exc, value, tb)
      File "/usr/lib/python3/dist-packages/proton/", line 45, in raise_
        raise v.with_traceback(tb)
      File "/usr/lib/python3/dist-packages/proton/", line 3853, in dispatch
      File "/usr/lib/python3/dist-packages/proton/", line 3778, in dispatch
        result = dispatch(handler, type.method, self)
      File "/usr/lib/python3/dist-packages/proton/", line 3667, in dispatch
        return m(*args)
      File "/usr/local/lib/python3.5/dist-packages/eventhubs-0.1.0-py3.5.egg/eventhubs/", line 142, in on_reactor_init
        self.connection = self.container.connect(self.address, reconnect=False, properties=properties)
    TypeError: connect() got an unexpected keyword argument 'properties'

    Kindly make appropriate changes to resolve above errror within repo. or

    suggest alternate python module/method to achive above obective.

    Thursday, January 25, 2018 12:16 PM

All replies