You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Event Hubs Client] AMQP Cancellation Support (Azure#25654)
The focus of these changes is to take advantage of the support for
cancellation tokens that was added to the AMQP transport library, preserving
existing timeout behavior by specifying an operation timeout for the link.
Copy file name to clipboardExpand all lines: sdk/eventhub/Azure.Messaging.EventHubs/CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,8 @@
4
4
5
5
### Features Added
6
6
7
+
- Support for cancellation tokens has been improved for AMQP operations, enabling earlier detection of cancellation requests without needing to wait for the configured timeout to elapse.
Copy file name to clipboardExpand all lines: sdk/eventhub/Azure.Messaging.EventHubs/src/Amqp/AmqpClient.cs
+12-16Lines changed: 12 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -99,6 +99,7 @@ internal class AmqpClient : TransportClient
99
99
///
100
100
/// <param name="host">The fully qualified host name for the Event Hubs namespace. This is likely to be similar to <c>{yournamespace}.servicebus.windows.net</c>.</param>
101
101
/// <param name="eventHubName">The name of the specific Event Hub to connect the client to.</param>
102
+
/// <param name="operationTimeout">The amount of time to allow for an AMQP operation using the link to complete before attempting to cancel it.</param>
102
103
/// <param name="credential">The Azure managed identity credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration.</param>
103
104
/// <param name="clientOptions">A set of options to apply when configuring the client.</param>
104
105
///
@@ -113,8 +114,9 @@ internal class AmqpClient : TransportClient
@@ -124,6 +126,7 @@ public AmqpClient(string host,
124
126
///
125
127
/// <param name="host">The fully qualified host name for the Event Hubs namespace. This is likely to be similar to <c>{yournamespace}.servicebus.windows.net</c>.</param>
126
128
/// <param name="eventHubName">The name of the specific Event Hub to connect the client to.</param>
129
+
/// <param name="operationTimeout">The amount of time to allow for an AMQP operation using the link to complete before attempting to cancel it.</param>
127
130
/// <param name="credential">The Azure managed identity credential to use for authorization. Access controls may be specified by the Event Hubs namespace or the requested Event Hub, depending on Azure configuration.</param>
128
131
/// <param name="clientOptions">A set of options to apply when configuring the client.</param>
129
132
/// <param name="connectionScope">The optional scope to use for AMQP connection management. If <c>null</c>, a new scope will be created.</param>
@@ -140,13 +143,15 @@ public AmqpClient(string host,
0 commit comments