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

[service-bus] init() refactor to propagate abortSignal support. #10578

Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
1b2ed3a
Uniting all the "link" related entities (mgmt link, receiver, sender).
richardpark-msft Aug 11, 2020
c8e8f0d
Fixing any lingering compile issues from my rebase/merge.
richardpark-msft Aug 11, 2020
471767d
Updating closeLink() to also have the option to only close the link b…
richardpark-msft Aug 11, 2020
5bb556e
Removing the optional qualifier for 'options' in the createRheaLink o…
richardpark-msft Aug 11, 2020
3671412
Fix log message format
richardpark-msft Aug 12, 2020
8b2db48
* Updating some names to better reflect what they are used for (_wasC…
richardpark-msft Aug 12, 2020
bb8107e
Make the unit test receiver guard against illogical conditions (ie, t…
richardpark-msft Aug 12, 2020
6338557
Doing some renames:
richardpark-msft Aug 12, 2020
88892a8
Fixing an issue where I was changing the name of the management link.…
richardpark-msft Aug 12, 2020
09a7983
Seems like a minor change but it makes sense to just remove the link …
richardpark-msft Aug 12, 2020
65d9339
Add in the request response link to the list of classes in the doc.
richardpark-msft Aug 12, 2020
1d9dbcd
Update doc
richardpark-msft Aug 12, 2020
3028271
* Make negotiateClaim and ensureTokenRenewal private rather than prot…
richardpark-msft Aug 13, 2020
8c8de9e
I fixed the token properly so we don't early exit from some code whic…
richardpark-msft Aug 13, 2020
1364843
Adding in a check after the last async call to see if the user closed…
richardpark-msft Aug 13, 2020
adc1546
Callback for the then() no longer needed to be async.
richardpark-msft Aug 13, 2020
0e28890
Plumbing abortSignal through for sessions
richardpark-msft Aug 13, 2020
295416e
Merge remote-tracking branch 'origin' into pr/richardpark-msft/10578
ramya-rao-a Aug 14, 2020
37a8a64
Fix failing unit test
ramya-rao-a Aug 14, 2020
de04d55
Add in the new type
richardpark-msft Aug 14, 2020
3152134
API was modified to allow for an abort signal to be passed when creat…
richardpark-msft Aug 14, 2020
c2f6565
ReceiverOptionsWithSession was the wrong type for receivers to pass.
richardpark-msft Aug 14, 2020
c9e6710
There are a few other ways close() can be calle aside from the user i…
richardpark-msft Aug 14, 2020
ac8b16f
Remove inaccurate @class tag.
richardpark-msft Aug 14, 2020
e520690
Merge branch 'richardpark-sb-track2-refactor-streamingreceiver-2-lite…
richardpark-msft Aug 14, 2020
840cbb5
Update comment to be a bit more accurate (we are aborting here).
richardpark-msft Aug 14, 2020
b475adb
Fix compile error in unit test.
richardpark-msft Aug 14, 2020
cb0f317
Adding in a log message when close() is called.
richardpark-msft Aug 14, 2020
e8b73c3
Updating comment
richardpark-msft Aug 14, 2020
801b821
Update so we have individual prefixes when we print out the link name…
richardpark-msft Aug 14, 2020
d505440
SessionReceiverOperations is now more like OperationOptionsBase. So m…
richardpark-msft Aug 14, 2020
5c89d65
Moving members around so we have a similar organization other classes:
richardpark-msft Aug 14, 2020
e9491fe
Remove two messages that no longer need to come from management link …
richardpark-msft Aug 14, 2020
225e40b
Merging with Harsha's naming changes.
richardpark-msft Aug 14, 2020
1330bd9
Fixing merge error where the same import was added twice.
richardpark-msft Aug 14, 2020
c08ae63
Get less adversarial in doc comment as per harsha's recommendation.
richardpark-msft Aug 14, 2020
26a8f6d
Removing irrelevant comment.
richardpark-msft Aug 14, 2020
2ec9f51
prettied the API review file on linux
richardpark-msft Aug 14, 2020
755f715
Missed a spot when we were trying to send to unpartitioned but didn't…
richardpark-msft Aug 14, 2020
a3f9195
Rename to _wasClosed to _wasClosedPermanently.
richardpark-msft Aug 17, 2020
2a7a90c
The two calls made below here don't actually care if link is initiali…
richardpark-msft Aug 17, 2020
f4c73b7
Remove unneeded this.link check around closeLink (which handles the l…
richardpark-msft Aug 17, 2020
3a1f49d
The comment was meant to apply to the .close() call.
richardpark-msft Aug 17, 2020
0f9ee45
Add test to make sure that multiple closes are not an issue on a link…
richardpark-msft Aug 17, 2020
e2612de
* Remove redundant _isMgmtRequestResponseLinkOpen method in favor of …
richardpark-msft Aug 17, 2020
92acfae
Switching to close("linkonly") (this is mgmt client specific) and lea…
richardpark-msft Aug 17, 2020
dc8857d
- Make naming consistent for wasClosedPermanently (missed the public …
richardpark-msft Aug 17, 2020
dfaedd0
empty
richardpark-msft Aug 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 4 additions & 10 deletions sdk/servicebus/service-bus/src/core/batchingReceiver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,7 @@ import {
Session
} from "rhea-promise";
import { InternalReceiveMode, ServiceBusMessageImpl } from "../serviceBusMessage";
import {
MessageReceiver,
OnAmqpEventAsPromise,
ReceiveOptions,
ReceiverType
} from "./messageReceiver";
import { MessageReceiver, OnAmqpEventAsPromise, ReceiveOptions } from "./messageReceiver";
import { ConnectionContext } from "../connectionContext";
import { throwErrorIfConnectionClosed } from "../util/errors";
import { AbortSignalLike } from "@azure/abort-controller";
Expand All @@ -41,7 +36,7 @@ export class BatchingReceiver extends MessageReceiver {
* @param {ReceiveOptions} [options] Options for how you'd like to connect.
*/
constructor(context: ConnectionContext, protected _entityPath: string, options?: ReceiveOptions) {
super(context, _entityPath, ReceiverType.batching, options);
super(context, _entityPath, "br", options);

this._batchingReceiverLite = new BatchingReceiverLite(
context,
Expand Down Expand Up @@ -69,7 +64,7 @@ export class BatchingReceiver extends MessageReceiver {
throw lastError;
}

return this._receiver;
return this.link;
},
this.receiveMode
);
Expand All @@ -87,8 +82,7 @@ export class BatchingReceiver extends MessageReceiver {
* @returns {Promise<void>} Promise<void>.
*/
async onDetached(connectionError?: AmqpError | Error): Promise<void> {
// Clears the token renewal timer. Closes the link and its session if they are open.
await this._closeLink(this._receiver);
await this.closeLink("linkonly");

if (connectionError == null) {
connectionError = new Error(
Expand Down
Loading