Skip to content

[Service Bus] Move settlement method impl out of message#12216

Merged
ramya-rao-a merged 5 commits into
Azure:masterfrom
ramya-rao-a:settlement-move
Nov 2, 2020
Merged

[Service Bus] Move settlement method impl out of message#12216
ramya-rao-a merged 5 commits into
Azure:masterfrom
ramya-rao-a:settlement-move

Conversation

@ramya-rao-a
Copy link
Copy Markdown
Contributor

@ramya-rao-a ramya-rao-a commented Nov 2, 2020

This PR is a follow up to the work done in #11962 and caters to the below point made there

Move the actual implementation from message to receiver. Right now, the methods on the receiver simply call the corresponding methods on the message

Additionally, it adds checks on peeked messages when one tries to settle them or tries to renew locks for them.

@ghost ghost added the Service Bus label Nov 2, 2020
@ramya-rao-a ramya-rao-a marked this pull request as ready for review November 2, 2020 07:08
@ramya-rao-a
Copy link
Copy Markdown
Contributor Author

/azp run js - servicebus - tests

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@richardpark-msft
Copy link
Copy Markdown
Member

I've got a PR with more or less the same ideas here if you haven't had a chance to see it: #12204

It has some cleanups for the old BatchingReceiverLite, etc... so if we can somehow merge what I have there with this PR then that'd be preferable.

or we can just merge the other PR since I think they cover the same ground.

Copy link
Copy Markdown
Member

@richardpark-msft richardpark-msft left a comment

Choose a reason for hiding this comment

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

Looks good.

@ramya-rao-a ramya-rao-a merged commit 937f4b5 into Azure:master Nov 2, 2020
@ramya-rao-a ramya-rao-a deleted the settlement-move branch November 2, 2020 19:43
ghost pushed a commit that referenced this pull request Nov 9, 2020
In #12216, we moved the code to settle a message and renew its lock from the ServiceBusMessageImpl to the ServiceBusReceiver. After this move, the only dependency left on the ConnectionContext in the ServiceBusMessageImpl is for the DataTransformer. This PR updates the ServiceBusMessage constructor to take the DataTransformer instead of the ConnectionContext and thus remove this dependency altogether. 

This closes #9944 as we no longer need to track the context or the receiver on the message.
This closes #10620 as well. Since the context is not being tracked on the message anymore, it does not matter that the data transformer is tracked on the context.
openapi-sdkautomation Bot pushed a commit to AzureSDKAutomation/azure-sdk-for-js that referenced this pull request Dec 23, 2020
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