Best way to capture events from Event Hub using Web App?

Domagoj Bazina 201 Reputation points
2022-06-30T14:20:22.19+00:00

Hello everyone,
I'm wondering, what is the best way to capture the events from Event Hub using Web App (Angular or React App)? There are several types of Endpoints like Azure Function, Web Hook, Storage Queues, Event Hubs and so on, but there is no option like "Web App". So which option is most appropriate to use in this case? I would like to use something that uses "Publish/Subscribe" method, therefore I would subscribe to the topic in the Web App (in that case, Web Hook options is "out").

I saw several ideas, someone suggested to use Azure SignalR Service, also I've found this example in documentation(https://learn.microsoft.com/en-us/azure/event-hubs/event-hubs-node-get-started-send).

Thanks in advance :)

Azure Event Hubs
Azure Event Hubs
An Azure real-time data ingestion service.
719 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,934 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ryan Hill 30,281 Reputation points Microsoft Employee Moderator
    2022-07-01T22:36:37.653+00:00

    Hi @Domagoj Bazina ,

    The best way is certainly subjective. I'm sure the community will share their own ideas and you'll have something to pick and choose from.

    If I'm understanding you correctly, you would like to have your NodeJS app subscribed to data that gets ingested into Event Hub. The doc you referenced is a good place to start, and as long as having that loop running doesn't impact performance, I don't see anything wrong with going that route.

    If it were me, I would use an Azure Function or WebJob that has an Event Hub trigger to do any data processing and forward that processed/sanitized data to an endpoint on the web app. I do know that there is a SignalR trigger and NodeJS client but I believe this has to run under aspnetcore so to get around that, I would suggest taking a look at Azure Web PubSub.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

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.