-
Notifications
You must be signed in to change notification settings - Fork 17
Adding subscription rules is very slow. #592
Comments
@mattdone01 the referenced PR is still a WIP.
Also, that client is the new
client (Microsoft.Azure.ServiceBus) that has not GA-ed yet 🙂
NSB.ASB transport is using WindowsAzure.ServiceBus.
|
For the current client, I've raised an issue with the PG. |
Hi Sean, Is there a path to upgrade NSB.ASB transport to the new Microsoft.Azure.ServiceBus library. It went RC1 the other day. I'd be happy to help out if required. |
Thank you @mattdone01. Very kind of you to offer help and it's appreciated. Given all these, the upgrade is unfortunately not a simple update. We're looking into the options internally to ensure that we enable our customers to be able to run on the new client w/o compromising trust and support of the existing customers that expect things to work w/o surprises. A side note on RC1 - be careful if you intend to use it in production. It is not a final version and there will be issues that would need to be resolves (like this one, or this one, or this one). |
Thanks Sean. Appreciate the response. When we start a console it takes about 2 minutes to start up as we have about 25 event handlers (CQRS implementation). I've debugged the NSB code and the bulk of the time is taken when checking for the existence of a rule (It throws an exception to check existence). I know it's not the best code but I don't suppose we could get a flag to bypass any rule check. Something like transport.ByPassRuleCheck with it obviously set to false as the default. That would be a big help. Thanks Sean. |
Is disabling installers and scripting your entities a viable option? |
And run without managed rights if you're topology doesn't change that often. This will bypass all those checks as well. See https://github.com/Particular/NServiceBus.AzureServiceBus/blob/develop/src/Transport/Topology/TopologyCreator.cs#L34 |
Hi Daniel, |
That just throws an "UnauthorizedAccessException" : 'Topology creation requires manage rights, but no manage rights could be found for the following namespace(s): |
You need at least this version https://github.com/Particular/NServiceBus.AzureServiceBus/releases/tag/7.2.3 and you need to disable the installers (remove |
I am using NServiceBus.Azure.Transports.WindowsAzureServiceBus.7.2.6
|
@mattdone01 Did you run without the debugger attached? When the debugger is attached for convenience reason we always execute the installers |
Yes I did. The problem I am trying to solve is the amount of time a debug console takes to load when there are a lot of event handlers (up to 2-3 minutes). Am I able to opt out of the "always execute the installers in debug mode convenience feature"? When you are start a debug console 10 times a day this gets to be an annoying time waste, almost to the point where we are looking at alternatives to NSB and ASB. Thanks. |
@mattdone01 I raised an issue in NServiceBus. We will also investigate into why it takes so long. |
With LOG DEBUG enabled, 30 handlers for 30 events and debugger attached Start clean:
Restart:
Quite insane you are right @mattdone01 Will investigate more. Sample used |
A preliminary first investigation shows that we can improve a lot here.
Will continue to investigate tomorrow and send in a few PRs as discussion points. |
I raise the following issues #597 The core fix would already give you a really decent boost. I'm trying to get this in asap |
Thanks for all your help @danielmarbach. My team really appreciates it. |
@mattdone01 I created a custom release build for you. It looks like the fix will take a few more days but the custom build should get you into a more decent situation regarding the startup behavior. Please try it out and see what it gives. |
Hi @danielmarbach , that patch makes start times considerably better now. We are down to about 15-20 seconds, which is pretty good. Thanks for your help on this. Let me know when it makes it in a GA release. |
@danielmarbach is this similar to #522? If so, it sounds like we're about to cut our deployment times in half when this gets out 🙌 |
@janpieterz yes the root cause is what we have fixed. Feel free to use the above custom build and tell me what happens 👯♂️ |
I'm on holiday so won't be able to for a while, but will mark this as to confirm, unless it'll be pushed into GA in the meantime. |
6.4 is out which contains the fix https://groups.google.com/forum/#!topic/particularsoftware/fsNiiUJwwdc Closing this. |
Btw. in 6.4 it is now possible to Disable the installers to run without manage permissions even with the debugger attached |
Great (startup and therefore deployment) speed improvement here! Thanks @danielmarbach |
@janpieterz 🙇 thanks for giving feedback. Always appreciated! |
Checking and adding subscription rules when connected to Azure service bus is very slow. This is due to the fact that there is no way to check if a rule exists and you have to handle and exception to add the rule. Microsoft has just approved and committed a pull request Azure/azure-service-bus-dotnet#192 that should fix this issue.
The code is at Line 82 of AzureServiceBusForwardingSubscriptionCreator. MS have now added GetRulesAsync() which should remove the need to handle an exception for an add. Can someone please confirm my assumptions is correct. Thanks
The text was updated successfully, but these errors were encountered: