Azure Logic App with trigger from Event Hubs but not triggered when there is event

Rachel I 26 Reputation points
2022-12-28T22:49:52.497+00:00

I'm working on a logic app where the trigger is when events are available in Event Hub. I have confirmed that I have sent events to the Event Hub by checking the metrics from the portal under the specific Event Hub Instance. However, the logic app doesn't get triggered even when event has been sent. There is no record error or warning so I don't know where else to check.

I followed this https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-azure-event-hubs regarding permission and connection string.

Would you know what else I am missing or anything else I should check? Do I need an event subscription?

Azure Logic Apps
Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
Azure Event Hubs
{count} votes

Answer accepted by question author
  1. Bruno Lucas 4,436 Reputation points MVP
    2022-12-31T04:09:46.993+00:00

    Hi @Rachel I

    Just went through this again to confirm my findings:

    On your post you mentioned this tutorial: https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-azure-event-hubs

    if you check that tutorial, the trigger screen shot is what you get on a "consumption" logic app (Documentation don't mention but you can check when creating one of each type.) : https://learn.microsoft.com/en-us/azure/connectors/connectors-create-api-azure-event-hubs#add-event-hubs-trigger

    The "Standard" version is a bit different and more limited:

    275191-image.png

    I have managed to get this working in portal with both the namespace connection and the hub connection. But I have had some trouble doing the whole process using VS Code.

    Another important detail, the workflow must be stateful (I believe this is so when the trigger pull the event, it can set the checkpoint). if you try to add the trigger to a stateless Workflow though VS code you may not see this error:

    275158-image.png

    In VS Code I created as "stateless" and managed to deploy without errors. What is different from portal:

    275159-image.png

    but it does not run:

    275079-image.png

    After that I created a stateful in VS code and redeployed:

    275182-image.png

    it run as expected:

    275137-image.png

    look like depending on the sequence of actions during development/design, some actions are not validated like when doing direct in the portal. like adding an event hub trigger to a stateless flow. that should inform the invalid action but won't happen in VS code

    2 suggestions:

    1. Make sure your workflow is stateful
    2. Try to check with an azure administrator with access to the portal if the workflow has been deployed as expected

    Case that information helps, don't forget to vote or mark as Answer to help the community. Cheers!

    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.