-
Notifications
You must be signed in to change notification settings - Fork 848
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[azservicebus] timeout error when accepting next session is not exported type #19039
Comments
Hi @arussellf5. Thank you for your feedback and we will look into it soon. Meanwhile, feel free to share your experience using the Azure SDK in this survey. |
Also as a footnote, the timeout occurred over 7 minutes after the request was made, not "within the allotted timeout of 00:01:04.9800000" as reported on the error message. |
…osoft:timeout error from Service Bus. The primary use is if we are doing an AcceptNextSessionFor<Entity>() and there aren't any available sessions. This should allow customers to figure out if there's a genuine failure or if their session-enabled queue/subscription is "empty". Fixes Azure#19039
Hi @arussellf5, I've got a fix for this. We do have an exported error type (azservicebus.Error), which has a Code field. There's a few examples in the example.go's in that PR if you want to see what it will look like. To your second question:
This is happening because we consider the com.microsoft:timeout error a retryable error, which means the error message you're seeing is a result of the last attempt and comes from the service. |
…on is not available (#19113) Adding a new error Code (CodeTimeout) for when we get back a com.microsoft:timeout error from Service Bus. The primary use is if we are doing an AcceptNextSessionFor<Entity>() and there aren't any available sessions. This should allow customers to figure out if there's a genuine failure or if their session-enabled queue/subscription is "empty". Fixes #19039
@richardpark-msft thanks for responding so quickly to this! Truly appreciated. |
No problem at all. I really appreciate when people take time to submit issues and it spurred a great discussion on our end as well. |
Any idea when this will be released? |
We release monthly (if there are changes). This one will go out in the second week of October, by our release schedule. |
pkg: github.com/Azure/azure-sdk-for-go/sdk/messaging/azservicebus
version: v1.1.0
go version: go 1.18.5
In testing, if I call the
azservicebus
client'sAcceptNextSessionForSubscription()
method and there is no session to accept, I get the following timeout error:This timeout error formerly contained a
*amqp.Error
which allowed for type checking. The timeout error is no longer exported, so I cannot check the type usingerrors.Is()
orerrors.As()
, and specifically handle the case of a foreseeable timeout. The documentation for theAcceptNextSessionForSubscription()
method claims that "if the operation fails it can return an *azservicebus.Error type if the failure is actionable." Would you please fix the current implementation so that the timeout error is exported?The text was updated successfully, but these errors were encountered: