-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[ServiceBus] set timeout on link properties #30832
Conversation
API change check APIView has identified API level changes in this PR and created following API reviews. |
/azp run python - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py
Outdated
Show resolved
Hide resolved
/azp run python - servicebus - tests |
No commit pushedDate could be found for PR 30832 in repo Azure/azure-sdk-for-python |
/azp run python - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few comments, thanks @l0lawrence!
sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/aio/_servicebus_receiver_async.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/aio/_transport/_pyamqp_transport_async.py
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py
Outdated
Show resolved
Hide resolved
/azp run python - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
a169868
to
2f8f713
Compare
sdk/servicebus/azure-servicebus/azure/servicebus/_transport/_pyamqp_transport.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py
Show resolved
Hide resolved
/azp run python - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/servicebus/azure-servicebus/azure/servicebus/_transport/_pyamqp_transport.py
Show resolved
Hide resolved
Heyyy guys. We ran into the same problem as the two issues that caused this PR. Is there any way that I can help close this PR? I havent contributed anything to the azure sdk but would love to learn how to! |
sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_client.py
Outdated
Show resolved
Hide resolved
Hi @ValMobBIllich , thanks for chiming in! Here is a doc that describes how to be an active contributor to the azure-sdk-for-python-repo. For this PR in particular there isn't anything else needed code-wise, but once we get to a final design point -- if you would be willing to help test this in your current environment that would be extremely helpful! |
9b64952
to
4b996be
Compare
sdk/servicebus/azure-servicebus/tests/async_tests/test_queues_async.py
Outdated
Show resolved
Hide resolved
/azp run python - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left a few comments but overall this looks v good!
sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py
Outdated
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/tests/async_tests/test_sessions_async.py
Show resolved
Hide resolved
sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py
Show resolved
Hide resolved
Co-authored-by: swathipil <76007337+swathipil@users.noreply.github.com>
sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py
Outdated
Show resolved
Hide resolved
* attempt to set timeout on link properties * jitter math * update receiver logic * update encode * move logic to pyamqp_transport * update docstring * add tests * update if statement * update if statements * whitespace * trailing whitespace * move logic into pyamqp_transport * pylint * update kwargs * Update sdk/servicebus/azure-servicebus/azure/servicebus/_servicebus_receiver.py Co-authored-by: Kashif Khan <361477+kashifkhan@users.noreply.github.com> * update async docstring too * update docstrings * add back in jitter logic to align with other lang * update client wording * update other receiver docstring * remove spacing * pylint * add comment * update client * fix pylint * update max_wait_time docstring * align iterator and receive_messages() behavior * docstring updates * asyn align iterator and receive_messages() * add deprecation * pylint fixes * add timeout kwarg * update docstring * client docstring * add to OperationTimeoutError logic * remove timeout from mock * nit * nit * revert doc * update error msg * nit * base handler async handling * doc * pylint * pylint * conn str doc update * remove ==True Co-authored-by: swathipil <76007337+swathipil@users.noreply.github.com> * add >65 to test * add warning * move note to docstring --------- Co-authored-by: Kashif Khan <361477+kashifkhan@users.noreply.github.com> Co-authored-by: swathipil <76007337+swathipil@users.noreply.github.com>
fixes #26056 and is related to questions raised in #29878 and #30907
fixes #11505
This PR adds in a timeout property on the receiver link, this timeout property only comes into effect on Session-Enabled Queues/Topics when NEXT_AVAILABLE_SESSION has been set. If you set max_wait_time (or whichever variable if we want to create a new one) when receiving it will be passed in through the receiverLink and the server will timeout and return after that time has been reached. This allows for customers to wait for less than the standard 65 seconds that the server default sets.
Update email threads for customers when merged
What is being Changed:
ServiceBusReceiver.receive_messages()
max_wait_time
remains unchanged in behaviorServiceBusReceiver
max_wait_time
now will impact connecting to NEXT_AVAILABLE_SESSION time