Skip to content

Commit 268d56f

Browse files
authored
[Event Hubs] Remove minimum timeout value (Azure#28970)
### Packages impacted by this PR @azure/event-hubs ### Issues associated with this PR N/A ### Describe the problem that is addressed by this PR One customer is complaining that the minimum wait of 60 seconds is too long and they wish to be able to lower it. ### What are the possible designs available to address the problem? If there are more than one possible design, why was the one in this PR chosen? N/A ### Are there test cases added in this PR? _(If not, why?)_ N/A ### Provide a list of related PRs _(if any)_ N/A ### Command used to generate this PR:**_(Applicable only to SDK release request PRs)_ ### Checklists - [x] Added impacted package name to the issue description - [ ] Does this PR needs any fixes in the SDK Generator?** _(If so, create an Issue in the [Autorest/typescript](https://github.com/Azure/autorest.typescript) repository and link it here)_ - [x] Added a changelog (if necessary)
1 parent eb5815c commit 268d56f

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

sdk/eventhub/event-hubs/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
### Other Changes
1212

13+
- 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.
14+
1315
## 5.11.3 (2023-11-07)
1416

1517
### Bugs Fixed

sdk/eventhub/event-hubs/src/models/public.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export enum CloseReason {
102102
* - `retryDelayInMs`: Amount of time to wait in milliseconds before making the next attempt. When `mode` is set to `Exponential`,
103103
* this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds.
104104
* - `timeoutInMs`: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any
105-
* retry attempts remaining. Minimum value: 60000 milliseconds.
105+
* retry attempts remaining. Default value: 60000 milliseconds.
106106
*
107107
* A simple usage can be `{ "maxRetries": 4 }`.
108108
*
@@ -162,7 +162,7 @@ export interface EventHubClientOptions {
162162
* - `retryDelayInMs`: Amount of time to wait in milliseconds before making the next attempt. When `mode` is set to `Exponential`,
163163
* this is used to compute the exponentially increasing delays between retries. Default: 30000 milliseconds.
164164
* - `timeoutInMs`: Amount of time in milliseconds to wait before the operation times out. This will trigger a retry if there are any
165-
* retry attempts remaining. Minimum value: 60000 milliseconds.
165+
* retry attempts remaining. Default value: 60000 milliseconds.
166166
*
167167
* A simple usage can be `{ "maxRetries": 4 }`.
168168
*

sdk/eventhub/event-hubs/src/util/retries.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ import { Constants, RetryOptions } from "@azure/core-amqp";
88
*/
99
export function getRetryAttemptTimeoutInMs(retryOptions: RetryOptions = {}): number {
1010
const { timeoutInMs } = retryOptions;
11-
return typeof timeoutInMs !== "number" ||
12-
!isFinite(timeoutInMs) ||
13-
timeoutInMs < Constants.defaultOperationTimeoutInMs
11+
return typeof timeoutInMs !== "number" || !isFinite(timeoutInMs)
1412
? Constants.defaultOperationTimeoutInMs
1513
: timeoutInMs;
1614
}

0 commit comments

Comments
 (0)