-
Notifications
You must be signed in to change notification settings - Fork 433
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
Javascript Functions should default to "cardinality": "many" for EventHubs #2815
Comments
So I think our template already defaults to many. I assume this issue is tracking that in terms of function.json, you don't need to say "cardinality:many"? |
Yep! The change is to default to batching if "cardinality" is omitted. |
Update: the way that "cardinality": "many" works is to transform any and all input data to an array type if cardinality == many on a given function. We can't default cardinality to many without a serious re-write of where this logic goes. There is a bug where dataType had to be specified to "string" on all event hubs trigger data that is not valid json, which is a regression from v1. The fix is here: #3170 |
Judging by this comment, it seems like this is something we probably won't be doing and instead make sure templates/docs explain that this is best practices. @pragnagopa / @fabiocav -- do either of you have context on this one? |
I believe the related issues spell out a strategy for fixing this. Having docs that explain that batched processing is a best practice doesnt help if the customer can't use it because their data is in a non-JSON format (see Azure/azure-functions-eventhubs-extension#118). So from my perspective this is work that should happen, and its mostly a matter of prioritization. |
The default behavior that we recommend is to batch trigger events. However, we have it as an opt-in setting right now. We should change this so that best practice = default behavior
https://stackoverflow.com/questions/46204764/eventhub-trigger-to-functions-cardinality-with-one-causing-higher-timeouts
Docs on EventHubs settings: https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-event-hubs#trigger---configuration
The text was updated successfully, but these errors were encountered: