0

I would need to create a trigger binding on an MQTT message from a broker outside of Azure. Is there any documentation on how to create custom bindings for triggers?

Azure Functions V2 with C# Thanks a lot

P.S. Work this example for my porpuse? https://medium.com/@yuka1984/how-to-make-custom-trigger-with-azure-functions-3bd85551ac5e

Andrea Tosato
  • 133
  • 10
  • Possible duplicate of [How do I implement a custom binding for Azure Functions?](https://stackoverflow.com/questions/44478231/how-do-i-implement-a-custom-binding-for-azure-functions) – rickvdbosch Dec 03 '18 at 14:04
  • 1
    There's a NuGet package for that already... [CaseOnline.Azure.WebJobs.Extensions.Mqtt](https://www.nuget.org/packages/CaseOnline.Azure.WebJobs.Extensions.Mqtt/) – rickvdbosch Dec 03 '18 at 14:06
  • Thanks a lot @rickvdbosch, I will try it! – Andrea Tosato Dec 03 '18 at 15:55
  • Make sure to run your Azure Function in App Service Plan. Custom triggers will only work (without being supported) in those, not in Consumption Plan. – silent Dec 03 '18 at 16:12
  • 1
    Maybe it's better to decouple your MQTT traffic to Azure Service Bus or something similar first and than process it with Azure Functions (push to pull decoupling help you to gain more control over your workload) – Sebastian Achatz Dec 03 '18 at 19:02
  • @SebastianAchatz right solution is event grid. But our costumer wan't to use it. – Andrea Tosato Dec 04 '18 at 14:28

1 Answers1

1

Custom triggers are not available for Azure Functions.

Source: https://github.com/Azure/azure-webjobs-sdk/wiki/Creating-custom-input-and-output-bindings

You can actually write custom triggers, I did that a while ago based on this, but it's not supported. Especially since the whole scale out logic will not work.

Supported are only custom input and output bindings at this time.

silent
  • 14,494
  • 4
  • 46
  • 86