I am having a requirement to parse all incoming messages using Azure function. I used the BlobTrigger and it works fine, but now i want to monitor multiple storage accounts and trigger the same function. Is it possible?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@kudlatiger As you may know, a function can have only one trigger. However, you can create a fan-in topology that meets the requirements of your scenario.
For example, you can create a Blob triggered function for each storage account you are monitoring. Each of these functions writes the URL of the incoming blob to a single Queue storage queue using a queue output binding. Your function that does the actual blob processing can then have a queue trigger listen on that queue and process each blob that it finds in its queue, which is actually blobs coming from various Storage accounts.
Hope that helps.
Does fan in topology scale well? I have 30+ messages per minute.
Another point is, I am having these blobs in different storage account. one in hot tier and one in cool tier. So where does 'queue' will sit in? Is it in new storage account?
@jeffhollan can you help out here, or should we move this discussion to the Forums or Stack Overflow?
Likely best for a forum but I think we could close it out here. I think the pattern I'd recommend is using Event Grid triggered on Storage. In that case you can create a single function but subscribe multiple storage accounts to send events (via Event Grid) to the same function.
Great Thank you. I will try the recommendation. It will help if we have any step by step documentation or blog? It's a real-time scenario and will benefit many Microsoft service users.
We have an internal work item now (1556880) to track this requested scenario for possible future documentation. #please-close
would like to see this feature, will be great helpful.
For example, you can create a Blob triggered function for each storage account you are monitoring.
What if the list of storage accounts is dynamic? Is there a way to support such a scenario?
Most helpful comment
Likely best for a forum but I think we could close it out here. I think the pattern I'd recommend is using Event Grid triggered on Storage. In that case you can create a single function but subscribe multiple storage accounts to send events (via Event Grid) to the same function.