Persistence for cosmosDB



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


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.



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?


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

(Mauro Servienti) #27

Here you go


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.

(Mauro Servienti) #30

@danielito could you please help us in better understanding your Azure Cosmos DB usage by answering this short survey?