How is Event Grid triggered if I want to send batched events to an Azure Function using EventGridTrigger binding?
My current infrastructure:
3rd Party Service forwards messages to HTTPTriggered Azure Function A
Azure Function A schedules messages to be sent to a session enabled Azure Service Bus Topic to the next 2 min increment in a 24-hour period
Azure Service Bus Topic has rules set up to direct messages to one of 2 subscriptions
2 TimerTriggered Azure Functions (B and C), one for each subscription, monitor each subscription every 2 min
If there are any messages, Azure Functions B and C processes all the messages in a session for each session in a subscription
I would love to have Functions B and C to be triggered by ServiceBusTrigger, but it is only limited to processing 1 message at a time.
To reduce the number of times a function is called/triggered I'm wondering if I can set up EventGrid instead of ServiceBus and use EventGridTrigger binding to call a function so it can process a batched array of messages? Is this even possible? I know that you can set a max-events-per-batch and preferred-batch-size-in-kilobytes parameter, but when/what situations will functions B and C be triggered?
For example, if 400 messages are forwarded from the 3rd party service and the hit the topic at the next 2 min increment, will EventGridTrigger batch all of those messages together and send them as an array to Function A and B at that moment in time?
How is Event Grid triggered if I want to send batched events to an Azure Function using EventGridTrigger binding?
My current infrastructure:
I would love to have Functions B and C to be triggered by ServiceBusTrigger, but it is only limited to processing 1 message at a time.
To reduce the number of times a function is called/triggered I'm wondering if I can set up EventGrid instead of ServiceBus and use EventGridTrigger binding to call a function so it can process a batched array of messages? Is this even possible? I know that you can set a max-events-per-batch and preferred-batch-size-in-kilobytes parameter, but when/what situations will functions B and C be triggered?
For example, if 400 messages are forwarded from the 3rd party service and the hit the topic at the next 2 min increment, will EventGridTrigger batch all of those messages together and send them as an array to Function A and B at that moment in time?