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 trigger for Python has wrong cardinality #1250

Open
jimbobbennett opened this issue Sep 7, 2022 · 0 comments
Open

EventHub trigger for Python has wrong cardinality #1250

jimbobbennett opened this issue Sep 7, 2022 · 0 comments

Comments

@jimbobbennett
Copy link
Contributor

jimbobbennett commented Sep 7, 2022

When creating an event hub trigger using Python, there is a cardinality mismatch.

The function.json has the following:

{
    "scriptFile": "__init__.py",
    "bindings": [
      {
        "type": "eventHubTrigger",
        "name": "event",
        "direction": "in",
        "eventHubName": "samples-workitems",
        "connection": "",
        "cardinality": "many",
        "consumerGroup": "$Default"
      }
    ]
}

Notice "cardinality": "many"

In the code in __init__.py, the expected cardinality is 1:

def main(event: func.EventHubEvent):

This was changed in #1179 to update the cardinality to one by chaining both the __init__.py file to take a single event, and renaming the name field in the function.json to reflect this, but the cardinality wasn't updated from many to one to match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant