Question

I am trying to set up a Play application that will connect to a mongoDB using the ReactiveMongo Scala driver. I have gotten it working but would ultimately like to connect to a mongoDB that has been built with SSL support. Does ReactiveMongo provide the ability to connect to a mongoDB over SSL?

I have been able to connect over SSL with Casbah in the past using

MongoClient(List[ServerAddress], 
            MongoClientOptions(socketFactory = SSLSocketFactory.getDefault)) 

I would like to use ReactiveMongo due to the asynchronous non-blocking nature, but I could use Casbah if that is my only option.

Was it helpful?

Solution

Reactive Mongo is built on Netty, adding SSL support shouldn't be much more than a line of code to insert the SSL handler into the Netty pipeline plus a few lines for making it configurable, I'd suggest making a pull request.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top