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

[Storage] Added max_messages kwarg to receive_messages() #23654

Merged

Conversation

vincenttran-msft
Copy link
Member

@vincenttran-msft vincenttran-msft commented Mar 24, 2022

As raised by a customer in #17301, their concern is that there is currently no support for defining a maximum number of messages to receive (and thus could be open to infinite loops under a set of certain circumstances).

This PR adds max_messages keyword support for receive_messages() and also adds sample code showcasing its use-case in queue_samples_message.py (and async-equivalents).

Thanks to @tasherif-msft for laying the groundwork in #18783 for this PR!

@ghost ghost added the Storage Storage Service (Queues, Blobs, Files) label Mar 24, 2022
@vincenttran-msft vincenttran-msft changed the title [Storage] Added max_messages kwarg to recieve_messages() [Storage] Added max_messages kwarg to receive_messages() Mar 29, 2022
Copy link
Member

@jalauzon-msft jalauzon-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good to me! Great work. I left two comments that you can take or leave :)

@vincenttran-msft vincenttran-msft merged commit fa064d6 into Azure:main Apr 1, 2022
rakshith91 pushed a commit to rakshith91/azure-sdk-for-python that referenced this pull request Apr 7, 2022
rakshith91 pushed a commit to rakshith91/azure-sdk-for-python that referenced this pull request Apr 10, 2022
@vincenttran-msft vincenttran-msft deleted the vincenttran/receive_messages branch April 27, 2022 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Storage Storage Service (Queues, Blobs, Files)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants