-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
ClientThis issue is related to a non-management packageThis issue is related to a non-management packageService Buscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.Workflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
Library name and version
Azure.Messaging.ServiceBus 7.20.1
Describe the bug
For cases when the service bus endpoint is not reachable, the cancellation token passed to PeekMessageAsync is not respected.
Expected behavior
The call to PeekMessageAsync should timeout on a failed connection attempt in accordance to the cancellation token passed in the call.
Actual behavior
the connection times out at a fixed 65 seconds.
Reproduction Steps
Execute the following in an environment where the service bus instance cannot be reached.
var service_bus_client = new Azure.Messaging.ServiceBus.ServiceBusClient("<CSTR>");
var receiver = service_bus_client.CreateReceiver("ej-file-commands");
CancellationTokenSource cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
cts.Token.Register(() => Console.WriteLine("Cancellation requested"));
await receiver.PeekMessageAsync(cancellationToken: cts.Token);
Environment
Windows and .net runtime 9.0.8
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ClientThis issue is related to a non-management packageThis issue is related to a non-management packageService Buscustomer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.issue-addressedWorkflow: The Azure SDK team believes it to be addressed and ready to close.Workflow: The Azure SDK team believes it to be addressed and ready to close.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that