How can we improve Microsoft Azure Functions?

EventHub Trigger filtering based on properties

It would be great to be able to provide a filtering expression in the binding of an eventHubTrigger. Using this I could configure my function to only be invoked for certain events that match the filter. For example, I store a property called "eventType" in the application properties of each event. My function is potentially only interested in events of one or more specific types. Currently I code this logic into the function, which works fine. However, it counts as an unnecessary invocation and increases the cost. Ideally the filtering would take place in the host and not incur a function invocation if the event consumed can be filtered out.
The reason for not just using separate event-hubs is the need to preserve ordering for all of related events, hence a single hub for all events pertaining to a certain entity (with the ID of the entity as the PartitionKey).

1 vote
Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)

We’ll send you updates on this idea

David W Martines shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

Unsure on this one but marking as unplanned. The filtering would also have to happen at the client to preserve ordering. However even if we did the filtering before the execution it’s still consuming compute so I don’t think it makes sense for it to be “free.” Just because the trigger is doing filtering before execution wouldn’t necessarily negate the price aspect. And since filtering often has some custom parsing / decoding / conditions it’s almost better to do it in code.

-
Jeff

2 comments

Sign in
(thinking…)
Sign in with: Microsoft
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base