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

[ServiceBus] Settlement move from Message to Receiver #14681

Merged
merged 18 commits into from
Nov 2, 2020

Conversation

yunhaoling
Copy link
Contributor

@yunhaoling yunhaoling commented Oct 22, 2020

addressing issues:
#14815
#14567

  • Removed class PeekedMessage.
  • Removed class ReceivedMessage under module azure.servicebus.aio.
  • Message settlement methods are moved from ServiceBusMessage to ServiceBusReceiver:
    • Use ServiceBusReceiver.complete_message instead of ServiceBusReceivedMessage.complete to complete a message.
    • Use ServiceBusReceiver.abandon_message instead of ServiceBusReceivedMessage.abandon to abandon a message.
    • Use ServiceBusReceiver.defer_message instead of ServiceBusReceivedMessage.defer to defer a message.
    • Use ServiceBusReceiver.dead_letter_message instead of ServiceBusReceivedMessage.dead_letter to dead letter a message.
  • Message renew_lock method is moved from ServiceBusMessage to ServiceBusReceiver:
    • Changed ServiceBusReceivedMessage.renew_lock to ServiceBusReceiver.renew_message_lock
  • AutoLockRenewer.register now takes ServiceBusReceiver as a positional parameter.

Note
This PR doesn't include auto_lock_renewer opted into the receiver, it would be a separate PR

@ghost ghost added the Service Bus label Oct 22, 2020
@yunhaoling
Copy link
Contributor Author

/azp run python - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yunhaoling yunhaoling marked this pull request as ready for review October 29, 2020 05:03
@yunhaoling
Copy link
Contributor Author

/azp run python - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yunhaoling
Copy link
Contributor Author

/azp run python - servicebus - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yunhaoling yunhaoling merged commit 2e5d263 into Azure:master Nov 2, 2020
lmazuel pushed a commit that referenced this pull request Nov 3, 2020
* code change to move settlement from message to receiver

* fix mypy

* update code change

* more code change

* sync test code update

* update test code

* fix mypy and pylint

* fix small issue in exception and live test

* fix pylint

* update sample code, doc, stress test code

* update changelog and migration guide

* update changelog

* address review comments

* eliminate duplication code in settlement
lmazuel pushed a commit that referenced this pull request Nov 3, 2020
* code change to move settlement from message to receiver

* fix mypy

* update code change

* more code change

* sync test code update

* update test code

* fix mypy and pylint

* fix small issue in exception and live test

* fix pylint

* update sample code, doc, stress test code

* update changelog and migration guide

* update changelog

* address review comments

* eliminate duplication code in settlement
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Nov 4, 2020
…into add_invoice_multipage

* 'master' of https://github.com/Azure/azure-sdk-for-python: (31 commits)
  add more samples (Azure#15007)
  Address feedbacks: Rename type, improve readme (Azure#14905)
  Correct Visual Studio Code default environment name (Azure#14648)
  [ServiceBus] Adjust AutoLockRenewer to only allow registration of intended types (ReceivedMessage and ServiceBusSession) (Azure#14600)
  Validate tenant IDs used in URLs (Azure#14955)
  [ServiceBus] Make sub-client initializers internal (add '_' to from_conn_str for receiver/sender) (Azure#14502)
  Raise minimum msal version to 1.6.0 (Azure#14992)
  update monitor to target '*' instead of azure-* (Azure#14985)
  Split create_basic_client into two methods (Azure#14673)
  [ServiceBus] receive related methods/constructor raise error if given max_wait_time <= 0 (Azure#14925)
  String unicode deserial (Azure#14958)
  Clarified exceptions docs (Azure#14947)
  search-documents: correct method calls in sample (Azure#14980)
  Catch exceptions thrown by async download (Azure#14946)
  Increment package version after release of azure_eventgrid (Azure#14266)
  [ServiceBus] Add additional stress test coverage to ensure parity with cross-language priorities (Azure#14437)
  Service Bus Connection String Parser (Azure#14772)
  Remove AmendCommit parameter (Azure#14965)
  revert creation takes full object change (Azure#14957)
  [ServiceBus] Settlement move from Message to Receiver (Azure#14681)
  ...
iscai-msft pushed a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Nov 4, 2020
* code change to move settlement from message to receiver

* fix mypy

* update code change

* more code change

* sync test code update

* update test code

* fix mypy and pylint

* fix small issue in exception and live test

* fix pylint

* update sample code, doc, stress test code

* update changelog and migration guide

* update changelog

* address review comments

* eliminate duplication code in settlement
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Nov 4, 2020
…into add_invoice_multipage_tests

* 'master' of https://github.com/Azure/azure-sdk-for-python: (31 commits)
  add more samples (Azure#15007)
  Address feedbacks: Rename type, improve readme (Azure#14905)
  Correct Visual Studio Code default environment name (Azure#14648)
  [ServiceBus] Adjust AutoLockRenewer to only allow registration of intended types (ReceivedMessage and ServiceBusSession) (Azure#14600)
  Validate tenant IDs used in URLs (Azure#14955)
  [ServiceBus] Make sub-client initializers internal (add '_' to from_conn_str for receiver/sender) (Azure#14502)
  Raise minimum msal version to 1.6.0 (Azure#14992)
  update monitor to target '*' instead of azure-* (Azure#14985)
  Split create_basic_client into two methods (Azure#14673)
  [ServiceBus] receive related methods/constructor raise error if given max_wait_time <= 0 (Azure#14925)
  String unicode deserial (Azure#14958)
  Clarified exceptions docs (Azure#14947)
  search-documents: correct method calls in sample (Azure#14980)
  Catch exceptions thrown by async download (Azure#14946)
  Increment package version after release of azure_eventgrid (Azure#14266)
  [ServiceBus] Add additional stress test coverage to ensure parity with cross-language priorities (Azure#14437)
  Service Bus Connection String Parser (Azure#14772)
  Remove AmendCommit parameter (Azure#14965)
  revert creation takes full object change (Azure#14957)
  [ServiceBus] Settlement move from Message to Receiver (Azure#14681)
  ...
@yunhaoling yunhaoling deleted the yuling-sb-settlement-move branch November 24, 2020 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants