Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple triggers for an Azure Function

We have an Azure Function that has an event hub trigger. Is it possible to have a trigger on more than one event hub for the same Azure Function?

like image 593
Naren Avatar asked Sep 01 '25 16:09

Naren


2 Answers

No, this is not a supported scenario at the moment.

From comments (Ling Toh Jan 18 '17 at 18:23): There are no plans to support multiple triggers per Function. You will have to create a Function for each EventHub. If there is common code that may be shared between Functions, you may move them to a helper method that can be called from each Function.

like image 186
Ling Toh Avatar answered Sep 04 '25 05:09

Ling Toh


From Github: Any workarounds for adding multiple triggers? #1544

If you want to have your same function code run for blobs in either account A or account B, the easiest thing to do this is to create multiple function.json files for each function but have them share the same code by pointing to the same script file. There's more info here.

like image 42
Michael Freidgeim Avatar answered Sep 04 '25 06:09

Michael Freidgeim