Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EventHub batch processing #1029

Closed
sergsalo opened this issue Dec 6, 2016 · 5 comments
Closed

EventHub batch processing #1029

sergsalo opened this issue Dec 6, 2016 · 5 comments

Comments

@sergsalo
Copy link

sergsalo commented Dec 6, 2016

It seems like Azure Functions' EventHub binding doesn't allow processing of more than one message at a time, when custom webjob does. This slows down processing dramatically. Are there any plans to add a way to process batch of event hub messages?

Signature for Azure Functions binding:
Run(string myEventHubMessage, TraceWriter log)

Something like:
Run(string[] myEventHubMessages, TraceWriter log)

@mathewc
Copy link
Member

mathewc commented Dec 7, 2016

This is already supported. In a C# function, you can bind to EventData[] events or string[] events. If this doesn't work for you, please reopen the bug with full details.

@mathewc mathewc closed this as completed Dec 7, 2016
@sergsalo
Copy link
Author

sergsalo commented Dec 7, 2016

According to this article https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-hubs, only next signature is supported:
public static void Run(string myEventHubMessage, TraceWriter log)

It is supported in WebJobs itself, but not in Azure Functions' plugin for EventHubs, seems like to me.

@mathewc
Copy link
Member

mathewc commented Dec 7, 2016

The docs don't enumerate all the possible signatures that are supported (many are). The docs should be improved I agree to list the possibilities.

When you say "seems like to me" do you mean you actually tried binding to EventData[] events and it doesn't work? It definitely should.

@sergsalo
Copy link
Author

sergsalo commented Dec 7, 2016

I will try and let you know.

@sergsalo
Copy link
Author

sergsalo commented Dec 7, 2016

It works, but requires "WindowsAzure.ServiceBus":"3.4.2" nuget package to be imported. Thanks.
Signature: public static async Task Run(string[] myEventHubMessage, TraceWriter log)

@Azure Azure locked as resolved and limited conversation to collaborators Jan 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants