How to get data from cosmos db in real time into my mern stack dashboard?

Developer 1 Reputation point
2022-06-14T05:12:54.89+00:00

Hello,i have used azure cosmos DB as a storage for storing azure IOT data using stream analytics.Then i connect my NodeJS to azure cosmos dB using cosmos DB keys,then make an API and use this API to show data on my react application.

Now i want to know how to get real time data from azure cosmos DB to NodeJS when new data inserted in the cosmos DB.
Please explain with a flow diagram with compete explanation.

I am getting confuse with different approaches mentioned on your documentation like change Feed,azure functions,Azure Synapse Analytics etc.

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,426 questions
Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,766 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Hasan Savran 331 Reputation points MVP
    2022-06-14T13:41:15.643+00:00

    You can use Change Feed functionality.
    When data changes Change Feed will fire Azure Function.
    You can integrate SignalR into Azure Function.
    SignalR will send a message to your application about the data change.
    Then your application can handle that message and do whatever you like from that point.

    0 comments No comments

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.