Azure / azure-functions-eventgrid-extension

EventGrid extension for Azure Functions
MIT License
48 stars 34 forks source link

Support batched Event Grid Events #71

Closed mattchenderson closed 5 years ago

mattchenderson commented 5 years ago

The programming model needs to have support for getting a collection of events as part of a single invocation.

public static void EventGridTest([EventGridTrigger] EventGridEvent[] eventGridEvents, ILogger log)
{
    ...
}

Keep in mind that this needs to work for other languages as well. Semantics for checkpointing / responding to Grid about completion need to be all-or-none.

See the EventHub trigger as an example.

Scenario-wise, part of this is to handle high-throughput. I can see a scenario where this is combined with Durable Functions to process through the batch, having checkpointed the whole batch with grid but capturing it in Durable

ankitkumarr commented 5 years ago

For other languages to work with this,

  1. We can leverage the cardinality property in function.json. So, users would likely have to specify "cardinality" : "many" in their function.json for the collection of events to work.
  2. The language workers (or libraries) would need to add support for converting data received by the host to the appropriate collection (for rich binding type).