Skip to content
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

Update README of EventHub #6151

Merged
merged 12 commits into from
Jun 29, 2019
29 changes: 21 additions & 8 deletions sdk/eventhub/azure-eventhubs/HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,39 @@

## 5.0.0b1 (2019-06-25)

- Added more configuration parameters when creating EventHubClient.
Version 5.0.0b1 is a preview of our efforts to create a client library that is user friendly and idiomatic to the Python ecosystem. The reasons for most of the changes in this update can be found in the [Azure SDK Design Guidelines for Python](https://azuresdkspecs.z5.web.core.windows.net/PythonSpec.html). For more information, please visit https://aka.ms/azure-sdk-preview1-python.

**New features**

- Added new configuration parameters for creating EventHubClient.
- `credential`: The credential object used for authentication which implements `TokenCredential` interface of getting tokens.
- `transport_type`: The type of transport protocol that will be used for communicating with the Event Hubs service.
- `max_retries`: The max number of attempts to redo the failed operation when an error happened.
- for detailed information about the configuration parameters, please read the reference documentation.
- Added new methods `get_partition_properties` and `get_partition_ids` to EventHubClient.
- Added support for http proxy.
- Added support for authentication using azure-identity credential.
- Added support for transport using AMQP over WebSocket.
ramya-rao-a marked this conversation as resolved.
Show resolved Hide resolved

**Breaking changes**

- New error hierarchy
- `azure.error.EventHubError`
- `azure.error.ConnectionLostError`
- `azure.error.ConnectError`
- `azure.error.AuthenticationError`
- `azure.error.EventDataError`
- `azure.error.EventDataSendError`
- Renamed Sender/Receiver to EventHubProducer/EventHubConsumer
- New APIs for creating EventHubProducer/EventHubConsumer.
- Renamed Sender/Receiver to EventHubProducer/EventHubConsumer.
- Renamed `add_sender` to `create_producer` and `add_receiver` to `create_consumer` in EventHubClient.
- EventHubConsumer is now iterable.
- Rename class azure.eventhub.Offset to azure.eventhub.EventPosition
- Rename class azure.eventhub.Offset to azure.eventhub.EventPosition.
- Rename method `get_eventhub_info` to `get_properties` of EventHubClient.
- Reorganized connection management, EventHubClient is no longer responsible for opening/closing EventHubProducer/EventHubConsumer.
- Each EventHubProducer/EventHubConsumer is responsible for its own connection management.
- Added support for context manager on EventHubProducer and EventHubConsumer.
- Reorganized async APIs into "azure.eventhub.aio" namespace and rename to drop the "_async" suffix.
- Added support for authentication using azure-core credential.
- Added support for transport using AMQP over WebSocket.
- Updated uAMQP dependency to 1.2.0

- Updated uAMQP dependency to 1.2.

## 1.3.1 (2019-02-28)

Expand Down
221 changes: 118 additions & 103 deletions sdk/eventhub/azure-eventhubs/README.md

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion sdk/eventhub/azure-eventhubs/azure/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@

# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
4 changes: 4 additions & 0 deletions sdk/eventhub/azure-eventhubs/azure/eventhub/aio/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
from .client_async import EventHubClient
from .consumer_async import EventHubConsumer
from .producer_async import EventHubProducer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def create_consumer(
:param prefetch: The message prefetch count of the consumer. Default is 300.
:type prefetch: int
:param loop: An event loop. If not specified the default event loop will be used.
:rtype: ~azure.eventhub.aio.receiver_async.EventHubConsumer
:rtype: ~azure.eventhub.aio.consumer_async.EventHubConsumer

Example:
.. literalinclude:: ../examples/async_examples/test_examples_eventhub_async.py
Expand Down Expand Up @@ -244,7 +244,7 @@ def create_producer(
queued. Default value is 60 seconds. If set to 0, there will be no timeout.
:type send_timeout: float
:param loop: An event loop. If not specified the default event loop will be used.
:rtype ~azure.eventhub.aio.sender_async.EventHubProducer
:rtype ~azure.eventhub.aio.producer_async.EventHubProducer

Example:
.. literalinclude:: ../examples/async_examples/test_examples_eventhub_async.py
Expand Down
4 changes: 2 additions & 2 deletions sdk/eventhub/azure-eventhubs/azure/eventhub/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def create_consumer(
:type operation: str
:param prefetch: The message prefetch count of the consumer. Default is 300.
:type prefetch: int
:rtype: ~azure.eventhub.receiver.EventHubConsumer
:rtype: ~azure.eventhub.consumer.EventHubConsumer

Example:
.. literalinclude:: ../examples/test_examples_eventhub.py
Expand Down Expand Up @@ -249,7 +249,7 @@ def create_producer(self, partition_id=None, operation=None, send_timeout=None):
:param send_timeout: The timeout in seconds for an individual event to be sent from the time that it is
queued. Default value is 60 seconds. If set to 0, there will be no timeout.
:type send_timeout: float
:rtype: ~azure.eventhub.sender.EventHubProducer
:rtype: ~azure.eventhub.producer.EventHubProducer

Example:
.. literalinclude:: ../examples/test_examples_eventhub.py
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(self, host, event_hub_path, credential, **kwargs):
"""
Constructs a new EventHubClient.

:param host: The hostname of the the Event Hub.
:param host: The hostname of the Event Hub.
:type host: str
:param event_hub_path: The path of the specific Event Hub to connect the client to.
:type event_hub_path: str
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
__path__ = __import__('pkgutil').extend_path(__path__, __name__)
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------------------------------
__path__ = __import__('pkgutil').extend_path(__path__, __name__)