throttling azure functions triggered off azure storage queues

46 Views Asked by At

I have a system where I have an Azure Storage account with a Queue per tenant. I want to segregate the tenant messages this is why I have a queue per tenant.

I have an azure function written in c#. I want to trigger an azure function when an item is added to a queue.

The purpose of this function will be to call a tenant specific application passing the queue message using http (essentially a webhook).

I could bind a single function to all queues, however I don't know all the tenants at runtime (although I could discover these on each triggering but this would cost $$$).

Further I would like to throttle reading from each tenants queue independently, so I think I need a function per tenant throttled using maxconcurrentcalls!

So when i configure a new tenant, I could use a pipeline to generate a new function, bound to the newly generated tenant queue.

This all feels a bit messy!

What am I missing here? Is this a decent approach?

This is all seems a bit harder than it should be.#

What am I missing?

0

There are 0 best solutions below