ServiceBusExplorer icon indicating copy to clipboard operation
ServiceBusExplorer copied to clipboard

Don't retrieve subscriptions at startup

Open Bubelgin opened this issue 4 years ago • 6 comments

As soon as we connect to service bus, SB Explorer will try to retrieve all topics and subscriptions. For a production environment, this means hundreds of topics with hundreds of subscriptions which makes the tool unusable as the process just takes forever to read all of them. If possible, it would be nice if subscriptions would be only retrieved once we expand a topic in the UI.

Bubelgin avatar Nov 25 '20 18:11 Bubelgin

That's a good idea. It would be great if you created a PR for it.

ErikMogensen avatar Nov 25 '20 18:11 ErikMogensen

@Bubelgin @ErikMogensen remember the possibility to define filters in the connect form allows you to restrict the list of entities that are loaded by the tool. Years ago I implemented this feature to avoid loading tons of entities when you select a namespace.

paolosalvatori avatar Nov 26 '20 08:11 paolosalvatori

@paolosalvatori, I might be mistaken but interpret @Bubelgin's feature request as a different feature from what you're describing. He wants to load the subscription node lazily, not disable it for good. What you're describing is the latter and could be used as a workaround (@Bubelgin see the screenshot below). image

I would suggest updating the issue description with a more specific feature description, replacing

As soon as we connect to service bus, SB Explorer will try to retrieve all topics and subscriptions. For a production environment, this means hundreds of topics with hundreds of subscriptions which makes the tool unusable as the process just takes forever to read all of them. If possible, it would be nice if subscriptions would be only retrieved once we expand a topic in the UI.

with

SBE loads all entity nodes and their sub-entities when starts. For topics/subscriptions that could be quite overwhelming. Add a feature to the list topics w/o loading all the subscriptions. Subscriptions should be loaded on-demand when a topic is expanded.

SeanFeldman avatar Nov 26 '20 17:11 SeanFeldman

@SeanFeldman @ErikMogensen @Bubelgin not exactly. In Azure Service Bus, you can specify a relative URL when creating an entity, as shown in the picture below. If you give a queue or topic a name equal to customers/customer1, Service Bus Explorer will represent this with a folder called customers, and all the entities sharing the same relative path will be under that folder:

image

Now, if you create a filter as shown in the pictures below:

image

image

and click OK, then you can just load the queues which name starts with customers:

image

This is not probably what @Bubelgin has in mind, but this can significantly help to reduce the number of entities loaded when you open a namespace.

Once opened the namespace, you can always change the filter for queues or topics by right-clicking the queues or topics node and selecting Filter Queues or Filter Topics from the dropdown menu as shown in the following picture:

image

hope this helps

paolosalvatori avatar Nov 26 '20 18:11 paolosalvatori

@paolosalvatori, thank you for the reminder about partitioned queues. That's very helpful. And frankly, I wasn't even aware of this option 😀

This issue is clearly talking about topics and subscriptions though:

As soon as we connect to service bus, SB Explorer will try to retrieve all topics and subscriptions

SeanFeldman avatar Nov 26 '20 18:11 SeanFeldman

The thing I explained above applies also to topics. There's no filter by the way to limit the number of subscriptions retrieved under a given topic. Said that, creating tens or hundreds of subscriptions under the same topic is a bad practice and an anti-pattern :)

paolosalvatori avatar Nov 27 '20 08:11 paolosalvatori