Azure / Azure/azure-functions-host

Support for not so custom TriggerBinding

Open
#2,746 28 comments 5 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

## Question

Azure Functions do not support custom `TriggerBinding`s. There is a good explanation of the reasons provided by Coby and @jeffhollan at the [April Azure functions live](https://youtu.be/5TilSjg3rF8?t=989). As far as I can understand the problem boils down to Scale Controller not having information about custom trigger and not being able to scale the function app when needed. One example might be a function reacting to stream of tweets.

That being said what if the custom trigger would be based on a source that is already supported by the existing trigger e.g. Azure Storage Queue? I've been working on a [spike](https://github.com/tmasternak/NServiceBus.Functions) that creates a custom trigger for ASQ and it looks that the Scale Controller handles the auto-scaling properly if I make my trigger pretend it's `queueTrigger`. In practice it means I provide `function.json` content as if it was `queueTrigger`.

Are there any plans to support customs triggers at that level?

## Background information

What I'm asking is a potential solution to a problem that I am trying to solve. What I would like to do is provide Azure Function users with capability to receive custom POCO types as input messages and be able to pass message headers between input message and any outgoing message that goes out via output collector. It would be also great if I could handle any custom message serialization behind the scenes. Something like [this](https://github.com/tmasternak/NServiceBus.Functions#nservicebusfunctions).

I would be really grateful for any suggestions.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the linked NServiceBus.Functions spike and its function.json configuration, especially the queueTrigger declaration. The issue does not name repository files or tests, and completion criteria are not defined; a maintainer decision is needed on whether this level of custom-trigger support should be implemented.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.