2
votes

I am developing an azure webjob which is monitoring a blob storage account for new inserted blobs. My storage account consists of multiple containers all holding similar information. Currently I'm using separate BlobTriggers for every container to monitor the single containers.

Is there a way to monitor the whole account for new blobs instead of every single container? If not, can I automatically iterate over the containers in a storage account and call the webjob with the container names as parameter?

1
As an update to mathewc's answer, this has been raised as issue #779Darshan

1 Answers

1
votes

No, currently each BlobTrigger monitors for changes on a single container. At startup time, the blob containers indicated by your BlobTrigger annotated functions result in multiple "listeners" being started, monitoring the various containers. So there's no runtime way for you to iterate over containers and set this self up yourself, short of codegen/ILGen of SDK methods with the appropriate attributes.

If you'd like, you can add a feature suggestion here: https://github.com/Azure/azure-webjobs-sdk/issues, and we can review it for the next release. However, I've never heard of anyone else needing this functionality, so it seems pretty corner case :)