question

swapnilnagpure-5837 avatar image
0 Votes"
swapnilnagpure-5837 asked MartinJaffer-MSFT edited

Real time data synchronization between Cosmos DB(Mongo DB API) and DB2

I am looking for real time data synchronization with 1-2 seconds latency between Azure Cosmos DB(Mongo DB API) and DB2 database without direct connection with on-premise database. What are the ways to achieve this scenario?

azure-data-factoryazure-cosmos-dbazure-stream-analytics
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @swapnilnagpure-5837,
We haven’t heard from you on the last response and was just checking back to see if you have a resolution yet .In case if you have any resolution please do share that same with the community as it can be helpful to others . Otherwise, will respond back with the more details and we will try to help .

Thanks
Martin

0 Votes 0 ·

Hi @MartinJaffer-MSFT
Please find the reply below

0 Votes 0 ·

1 Answer

MartinJaffer-MSFT avatar image
0 Votes"
MartinJaffer-MSFT answered MartinJaffer-MSFT edited

Hello @swapnilnagpure-5837 and welcome to Microsoft Q&A.

I understand you want to Sync Cosmos (Mongo) with DB2, with Cosmos doing the pushing. What I don't understand is what you mean by without direct connection with on-premise database.

What kind of connection did you have in mind?

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @MartinJaffer-MSFT

When I said 'without direct connection with on-premise database' I meant we cannot establish DB2 connection directly we have to do it using some Gateway or using some other service. But that's part is not that much important. The real problem for me is real time synchronization. ADF is good solution for syncing but it don't provide real time sync.

0 Votes 0 ·

So I think what you are looking for is "Change streams" which seems similar to the Change Feed in SQL. @swapnilnagpure-5837

By itself, Data Factory does not know when a change is made in Cosmos Mongo. This means it cannot do appropriate pulls. Data Factory may not be the right tool for real-time synchronization. However if you can hook up an Event Trigger to Cosmos, then you could make real-time work depending upon volume. This might require a custom event.

Change Feed Design Patterns
Cosmos Change Feed
Change Feed in Mongo


0 Votes 0 ·