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 output binding cannot send events from batch #3031

Open
kevin808 opened this issue Oct 24, 2023 · 0 comments
Open

EventHub output binding cannot send events from batch #3031

kevin808 opened this issue Oct 24, 2023 · 0 comments

Comments

@kevin808
Copy link

kevin808 commented Oct 24, 2023

Please provide a succinct description of the issue.

Repro steps

Provide the steps required to reproduce the problem

  1. Repo for reproduce: https://github.com/kevin808/functionapp-typescript-eventhubtrigger/tree/master
    It used a eventhub trigger to receive events and eventhub output binding to send events to another eventhub
import { AzureFunction, Context } from "@azure/functions"

const eventHubTrigger: AzureFunction = async function (context: Context, ingressEventHubMessagesConsumer: any[]): Promise<void> {
    ingressEventHubMessagesConsumer.forEach((message, index) => {
        context.log('eventHubTrigger Message received: ', message);
        context.bindings.egressEventHubMessageProducer = message;
        context.log('eventHubTrigger Message sent: ',index,message);
    });
};
 
export default eventHubTrigger;
  1. Update the local.settings.json and EventHubTrigger/function.json accordingly.

  2. Build and run the function app from local or deploy to Azure Function App.

  3. Generate events in source eventhub

Expected behavior

When cardinality in EventHubTrigger/function.json set to many, all the events are sent to Event Hub.

Actual behavior

Only one event is sent to the Event Hub when a batch of events are received from Event Hub trigger even though the logs indicates all the events are sent.

Known workarounds

Set cardinality to one, all the events are sent successfully.

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

No branches or pull requests

1 participant