diff --git a/sdk/eventhub/event-hubs/CHANGELOG.md b/sdk/eventhub/event-hubs/CHANGELOG.md index 1cba5d17ad9f..0e74d8b22328 100644 --- a/sdk/eventhub/event-hubs/CHANGELOG.md +++ b/sdk/eventhub/event-hubs/CHANGELOG.md @@ -10,6 +10,8 @@ ### Other Changes +- The minimum value of timeout for all operations is no longer 60 seconds. The user can now set the timeout to lower values if needed. The default timeout value is still 60 seconds. + ## 5.11.3 (2023-11-07) ### Bugs Fixed diff --git a/sdk/eventhub/event-hubs/src/models/public.ts b/sdk/eventhub/event-hubs/src/models/public.ts index 9c03323b6efc..6a11ba48db96 100644 --- a/sdk/eventhub/event-hubs/src/models/public.ts +++ b/sdk/eventhub/event-hubs/src/models/public.ts @@ -102,7 +102,7 @@ export enum CloseReason { * - `retryDelayInMs`: Amount of time to wait in milliseconds before making the next attempt. When `mode` is set to `Exponential`, * this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds. * - `timeoutInMs`: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any - * retry attempts remaining. Minimum value: 60000 milliseconds. + * retry attempts remaining. Default value: 60000 milliseconds. * * A simple usage can be `{ "maxRetries": 4 }`. * @@ -162,7 +162,7 @@ export interface EventHubClientOptions { * - `retryDelayInMs`: Amount of time to wait in milliseconds before making the next attempt. When `mode` is set to `Exponential`, * this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds. * - `timeoutInMs`: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any - * retry attempts remaining. Minimum value: 60000 milliseconds. + * retry attempts remaining. Default value: 60000 milliseconds. * * A simple usage can be `{ "maxRetries": 4 }`. * diff --git a/sdk/eventhub/event-hubs/src/util/retries.ts b/sdk/eventhub/event-hubs/src/util/retries.ts index 1995055e5915..f2acda82dad1 100644 --- a/sdk/eventhub/event-hubs/src/util/retries.ts +++ b/sdk/eventhub/event-hubs/src/util/retries.ts @@ -8,9 +8,7 @@ import { Constants, RetryOptions } from "@azure/core-amqp"; */ export function getRetryAttemptTimeoutInMs(retryOptions: RetryOptions = {}): number { const { timeoutInMs } = retryOptions; - return typeof timeoutInMs !== "number" || - !isFinite(timeoutInMs) || - timeoutInMs < Constants.defaultOperationTimeoutInMs + return typeof timeoutInMs !== "number" || !isFinite(timeoutInMs) ? Constants.defaultOperationTimeoutInMs : timeoutInMs; }