diff --git a/sdk/eventhub/azure-eventhubs/HISTORY.md b/sdk/eventhub/azure-eventhubs/HISTORY.md index c1b859b55f00..11ae91dc04fb 100644 --- a/sdk/eventhub/azure-eventhubs/HISTORY.md +++ b/sdk/eventhub/azure-eventhubs/HISTORY.md @@ -1,5 +1,20 @@ # Release History +## 5.0.0b2 (2019-08-06) + +**New features** + +- Added ability to create and send EventDataBatch object with limited data size. +- Added new configuration parameters for exponential delay among each retry operation. + - `retry_total`: The total number of attempts to redo the failed operation. + - `backoff_factor`: The delay time factor. + - `backoff_max`: The maximum delay time in total. + +**Breaking changes** + +- New `EventProcessor` design + - The `EventProcessorHost` was waived. + ## 5.0.0b1 (2019-06-25) 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. diff --git a/sdk/eventhub/azure-eventhubs/azure/eventhub/_consumer_producer_mixin.py b/sdk/eventhub/azure-eventhubs/azure/eventhub/_consumer_producer_mixin.py index 3e974c622a45..9124ff261949 100644 --- a/sdk/eventhub/azure-eventhubs/azure/eventhub/_consumer_producer_mixin.py +++ b/sdk/eventhub/azure-eventhubs/azure/eventhub/_consumer_producer_mixin.py @@ -15,14 +15,13 @@ def _retry_decorator(to_be_wrapped_func): def wrapped_func(self, *args, **kwargs): - timeout = kwargs.get("timeout", None) + timeout = kwargs.pop("timeout", None) if not timeout: timeout = 100000 # timeout None or 0 mean no timeout. 100000 seconds is equivalent to no timeout timeout_time = time.time() + timeout max_retries = self.client.config.max_retries retry_count = 0 last_exception = None - kwargs.pop("timeout", None) while True: try: return to_be_wrapped_func(self, timeout_time=timeout_time, last_exception=last_exception, **kwargs) diff --git a/sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_producer_mixin_async.py b/sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_producer_mixin_async.py index 3027fcfc3287..a90198f42f54 100644 --- a/sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_producer_mixin_async.py +++ b/sdk/eventhub/azure-eventhubs/azure/eventhub/aio/_consumer_producer_mixin_async.py @@ -15,14 +15,13 @@ def _retry_decorator(to_be_wrapped_func): async def wrapped_func(self, *args, **kwargs): - timeout = kwargs.get("timeout", None) + timeout = kwargs.pop("timeout", None) if not timeout: timeout = 100000 # timeout None or 0 mean no timeout. 100000 seconds is equivalent to no timeout timeout_time = time.time() + timeout max_retries = self.client.config.max_retries retry_count = 0 last_exception = None - kwargs.pop("timeout", None) while True: try: return await to_be_wrapped_func(self, timeout_time=timeout_time, last_exception=last_exception, **kwargs)