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] Session manager sample preview.1 #8490
[service-bus] Session manager sample preview.1 #8490
Conversation
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionManagerSample.ts
Outdated
Show resolved
Hide resolved
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionManagerSample.ts
Outdated
Show resolved
Hide resolved
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionManagerSample.ts
Outdated
Show resolved
Hide resolved
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionManagerSample.ts
Outdated
Show resolved
Hide resolved
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionManagerSample.ts
Outdated
Show resolved
Hide resolved
Its definitely not simple :) Can we have a pull counterpart to this to see how it fares in terms of complexity? |
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionManagerSample.ts
Outdated
Show resolved
Hide resolved
I think the pull sample will just be more complex (also, I sent out that preview link where I did have that in it). It'll seem less complex until you realize you have to complete/abandon messages, etc... (which is our general argument in favor of using With regard to the overall complexity - the subject matter itself is complex too but we're going to have to explain it in some fashion. Code might be the simplest way. We also have some prerequisites before they even try this:
Also, while this is more complex than our usual SDK samples but I think it's not actually as complex as samples we might offer in other avenues, like when you can download a whole-app style sample from docs.microsoft.com. Aside from the feedback you provided in your PR comments was anything else nagging at the back of your mind about it? |
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionManagerSample.ts
Outdated
Show resolved
Hide resolved
- Modifying sample to just rely on the async call.
…nitialized receiver by the time we get it.
- sessionId will never be undefined so I can remove that constraint (there's some unpretty code supporting it but we can fix that before final commit) - Had to uncomment the sessionmanager class - it's "used" in some spots and needs to be removed from there first.
- Keep the "named" events for simple "fill in the blank" style programming - Remove them from being parameters, no need to pass the types around.
…s were available.
…tController above.
…ation (delay on any error).
Co-Authored-By: Ramya Rao <ramya.rao.a@outlook.com>
- Streamline processClose() and just print out the reason string since it's already suitable for reporting - Branch in processError - non-session ID errors are ones that are receiver based, etc... - Handle operationTimeout error which also appears to happen when there are no sessions
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionRoundRobin.ts
Outdated
Show resolved
Hide resolved
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionRoundRobin.ts
Show resolved
Hide resolved
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionRoundRobin.ts
Show resolved
Hide resolved
Co-Authored-By: Harsha Nalluru <sanallur@microsoft.com>
…b.com/richardpark-msft/azure-sdk-for-js into richardpark-sb-track2-session-manager
sdk/servicebus/service-bus/samples/typescript/src/advanced/sessionRoundRobin.ts
Outdated
Show resolved
Hide resolved
- Rename the method names to make them seem less official and more "sample" related. - Update doc comments to help users understand which functions are part of the base library and which aren't.
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.
Are we adding the JS version of the sample in a separate PR?
Nope, generating this now. |
/azp run js - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run js - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
- These tests were always creating a vestigial 'receiver' in their initialization that they never used. It always got overwritten. - Now that create() is no longer lazy for session receivers it started alerting earlier when there were no messages available for a session (known behavior). So....switching over to removing the creation of the vestigial receiver. :)
/azp run js - servicebus - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
Adding a sample that is similar to the functionality of what was in the unpublished SessionManager class in track 1. As part of this change we also changed the signature of createSessionReceiver to be async which allows the user to know that their session is definitely locked before they start their subscription. (also, fixed a test issue where newer versions of Linux can return EAI_AGAIN rather than ENOTFOUND when looking for a bogus DNS entry) Fixes Azure#8603 Fixes Azure#7951
…8522) * [KeyVault-Certificates] Finally removing KVPoller and KVPollerLike * Update package.json * making core-lro consistent * Restoring KVPollerLike, now as an alias * updated pnpm-lock.yml * CHANGELOG update * [service-bus] Session manager sample preview.1 (#8490) Adding a sample that is similar to the functionality of what was in the unpublished SessionManager class in track 1. As part of this change we also changed the signature of createSessionReceiver to be async which allows the user to know that their session is definitely locked before they start their subscription. (also, fixed a test issue where newer versions of Linux can return EAI_AGAIN rather than ENOTFOUND when looking for a bogus DNS entry) Fixes #8603 Fixes #7951 * resettin pnpm lock from master and rush update Co-authored-by: Richard Park <51494936+richardpark-msft@users.noreply.github.com> Co-authored-by: Karishma Ghiya <kaghiya@microsoft.com>
Built a sample that users can use as a basis for building their own round-robin session receiver.
As part of this I made two changes in the core package: