Can we set Orchestration client as event hub trigger in azure durable function

Dhoke, Abhijeet 1 Reputation point
2021-12-15T18:13:05.597+00:00

Hello team,

Need quick help!!!

I am trying to read event hub message and pass that message to another function.

So trying to achieve solution for the above problem statement. I had created event hub trigger function. but question arises that, how i am going to pass that data to another function.

Or in simple manner how I am going to create event hub trigger function as client starter function so that i can hit orchestration functions.

Regards,
Abhi

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,932 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Jaliya Udagedara 2,836 Reputation points MVP Volunteer Moderator
    2021-12-15T19:59:20.437+00:00

    You can do something like below,

    public static class Function1
    {
        [FunctionName("Function1")]
        public static async Task Run([EventHubTrigger("samples-workitems", Connection = "EventHubConnectionString")] EventData[] events,
            [DurableClient] IDurableOrchestrationClient durableOrchestrationClient,
            ILogger log)
        {
            // Other Code
    
            await durableOrchestrationClient.StartNewAsync("DurableFunction", events);
        }
    }
    

Your answer

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