-
Notifications
You must be signed in to change notification settings - Fork 99
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
How to receive events batch in Eventhub triggered function #411
Comments
@asavaritayal - This needs to be documented. Receiving a batch of eventhub events is the recommended approach. |
While working on a different EventHub issues, came across this issue: Azure/azure-functions-eventhubs-extension#118 (unresolved as of now). Looks like setting |
@maiqbal11 Thanks for linking the webjobs issue. I set to |
@maiqbal11 I found that I lose eventhub meta data, like |
For batch processing, trigger data and metadata is received as an array via RPC. Please see java sample code here: https://github.com/Azure/azure-functions-java-worker/blob/dev/endtoendtests/src/main/java/com/microsoft/azure/functions/endtoend/EventHubTriggerTests.java#L27 @elprans / @maiqbal11 - Does python worker expose an array of metadata? |
@pragnagopa Thanks for your information. I checked the similar test code path https://github.com/Azure/azure-functions-python-worker/blob/dev/tests/test_eventhub_functions.py |
The SystemPropertiesArray isn't currently being populated by the Python worker. Will need to make a change that allows it to handle this case. |
It includes fix of the CI. I've done two things. 1. Fix timeout issue on CosmosDB. 2. Make HttpClient as static. This part is not the root cause of the CI fail, however, I keep it as better practice than instantiate eachtime.
Investigative information
I have a eventhub triggered function in python and want to receive events in batch.
In function.json set
cardinality
tomany
"cardinality": "many",
What should the parameter in main function to pass a list of events?
This example can only get one event data:
def main(event: func.EventHubEvent):
The text was updated successfully, but these errors were encountered: