Persistence for cosmosDB

azureservicebus
azurepersistence

#21

i checked also the connection string and it is ok. when i removed the “MongoDBPersistence” i could connect.


#22

someone have solution for this?


(Mauro Servienti) #23

Based on the above my hunch is that the problem is on the CosmosDB side. Googling for the error it seems you are not alone, there are users (that are not using NServiceBus) facing the same issue when trying to connect to a CosmosDB replica-set using the MongoDB flavor.

I’m not sure what we can do, here. If I try a sample that uses the MongoDB community persistence connected to a CosmosDB instance it just works. There might be things in your local network configuration that are preventing the communication to happen (as there were before with TLS configuration), or it might really be a CosmosDB thing.

As previously suggested you should also get in touch with the NServiceBus.MongoDB mantainers, raising an issue with them, they might have already faced similar issues.

.m


#24

thank you for your answer. can you show me your example? which mongo driver and nsb version you use?


(Mauro Servienti) #25

What’s the best way to share it with you?


#26

i think the best way will be in git. thank you.


(Mauro Servienti) #27

Here you go https://github.com/mauroservienti/CosmosDB-MongoAPI-Demo


#28

thank you. unfortunately we are working with nsb 5.2.12 version and with this version we cannot connect. upgrade the nsb version will be a problem for us right now.


(Mauro Servienti) #29

that’s a news :slight_smile:
I suspect that there isn’t much you can do, the MongoDB Persistence fo NServiceBus V5 probably uses an old version of the MongoDB Client that is not fully supported by CosmosDB.

As said you should raise an issue with the Community MongoDB Persistence maintainers to see if there is anything that can be done.