Skip to content
This repository was archived by the owner on Oct 12, 2023. It is now read-only.

Conversation

@annatisch
Copy link
Member

No description provided.

Run the EventHubClient in blocking mode.
Opens the connection and starts running all Sender/Receiver clients.

:rtype: ~azure.eventhub.client.EventHubClient
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing correct docstring

:param epoch: The epoch value for the receiver.
:type epoch: int
:param prefetch: The message prefetch count of the receiver. Default is 300.
:type prefetch: int
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add operation to docstring

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

self._partition_key = types.AMQPSymbol(EventData.PROP_PARTITION_KEY)
self._annotations = {}
self._properties = {}
self._msg_properties = MessageProperties()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make properties public?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

elif message:
self.message = message
self._annotations = message.annotations
self._properties = message.application_properties
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get message properties

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

output['partition_ids'] = [p.decode('utf-8') for p in eh_info[b'partition_ids']]
return output

def add_async_receiver(self, consumer_group, partition, offset=None, prefetch=300, operation=None, loop=None):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to remove async

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe next release

self.close(exception=error)
raise error

def selector(self, default):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave for now

msg_timeout=Sender.TIMEOUT)
self._handler.open(connection)

def get_handler_state(self):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs docstring

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

msg_timeout=Sender.TIMEOUT)
await self._handler.open_async(connection=connection)

async def has_started(self):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs docstring

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

event_data.message.on_send_complete = lambda o, c: callback(o, Sender._error(o, c))
self._handler.queue_message(event_data.message)

def wait(self):
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need async wait

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@annatisch annatisch merged commit 91b630c into Azure:master Jul 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant