I am using MassTransit and have a worker deployed to an Azure Container App. In an attempt to keeps costs as low as possible, I would like the container to scale to zero.
Given that I use the default mechanisms built into MassTransit to create the topology I am seeking guidance on a few things.
- Since I am not really aware of the names of the entities in ServiceBus until they are created at runtime, what is the process / guidance / best practices for programmatically creating scale rules in the container app so that it can scale to zero but also spin the container up when work needs to be done?
- How are scaling rules built in container apps for topics? The only available rules I see are for queues?
- I am using bicep to deploy resources to my azure subscription. Is there some method available for me to know what the names of the entities will be ahead of time so that I can create the scaling rules during this step?
1