Skip to content
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

Closed
arussellf5 opened this issue Sep 6, 2022 · 7 comments · Fixed by #19113
Closed

[azservicebus] timeout error when accepting next session is not exported type #19039

arussellf5 opened this issue Sep 6, 2022 · 7 comments · Fixed by #19113
Assignees
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus

Comments

@arussellf5
Copy link

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's AcceptNextSessionForSubscription() method and there is no session to accept, I get the following timeout error:

*Error{Condition: com.microsoft:timeout, Description: The operation did not complete within the allotted timeout of 00:01:04.9800000. The time allotted to this operation may have been a portion of a longer timeout. For more information on exception types and proper exception handling, please refer to https://aka.ms/ServiceBusExceptions . TrackingId:0d5d0118-2aaa-4b60-92af-7a3882f93837_B0, SystemTracker:nalb-int-tests:Topic:14prizb4|0tzhfbtr, Timestamp:2022-09-06T19:25:22 TrackingId:03ff398b38f8438fba50b343d7b09534_G18, SystemTracker:gateway7, Timestamp:2022-09-06T19:25:22, Info: map[]}

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 using errors.Is() or errors.As(), and specifically handle the case of a foreseeable timeout. The documentation for the AcceptNextSessionForSubscription() 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?

@ghost ghost added needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. customer-reported Issues that are reported by GitHub users external to the Azure organization. question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 6, 2022
@ghost
Copy link

ghost commented Sep 6, 2022

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.

@arussellf5
Copy link
Author

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.

@jhendrixMSFT jhendrixMSFT added Service Bus Client This issue points to a problem in the data-plane of the library. and removed needs-triage Workflow: This is a new issue that needs to be triaged to the appropriate team. labels Sep 6, 2022
@ghost ghost added the needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team label Sep 6, 2022
richardpark-msft pushed a commit to richardpark-msft/azure-sdk-for-go that referenced this issue Sep 14, 2022
…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
@richardpark-msft
Copy link
Member

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:

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.

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.

richardpark-msft added a commit that referenced this issue Sep 14, 2022
…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
@arussellf5
Copy link
Author

@richardpark-msft thanks for responding so quickly to this! Truly appreciated.

@richardpark-msft
Copy link
Member

@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.

@ryepup
Copy link

ryepup commented Sep 27, 2022

Any idea when this will be released?

@richardpark-msft
Copy link
Member

We release monthly (if there are changes). This one will go out in the second week of October, by our release schedule.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Client This issue points to a problem in the data-plane of the library. customer-reported Issues that are reported by GitHub users external to the Azure organization. needs-team-attention Workflow: This issue needs attention from Azure service team or SDK team question The issue doesn't require a change to the product in order to be resolved. Most issues start as that Service Bus
Projects
None yet
4 participants