diff --git a/Functions.Templates/Templates/EventHubTrigger-Python/__init__.py b/Functions.Templates/Templates/EventHubTrigger-Python/__init__.py index 987e36eb3..071a661ce 100644 --- a/Functions.Templates/Templates/EventHubTrigger-Python/__init__.py +++ b/Functions.Templates/Templates/EventHubTrigger-Python/__init__.py @@ -1,8 +1,10 @@ +from typing import List import logging import azure.functions as func -def main(event: func.EventHubEvent): - logging.info('Python EventHub trigger processed an event: %s', - event.get_body().decode('utf-8')) +def main(events: List[func.EventHubEvent]): + for event in events: + logging.info('Python EventHub trigger processed an event: %s', + event.get_body().decode('utf-8')) diff --git a/Functions.Templates/Templates/EventHubTrigger-Python/function.json b/Functions.Templates/Templates/EventHubTrigger-Python/function.json index dce12095c..bfe94b962 100644 --- a/Functions.Templates/Templates/EventHubTrigger-Python/function.json +++ b/Functions.Templates/Templates/EventHubTrigger-Python/function.json @@ -3,7 +3,7 @@ "bindings": [ { "type": "eventHubTrigger", - "name": "event", + "name": "events", "direction": "in", "eventHubName": "samples-workitems", "connection": "",