Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for extra_opts in connection string (like {:ssl => true, :... => ...}) #42

ghost opened this issue Oct 11, 2012 · 1 comment


Copy link

ghost commented Oct 11, 2012

Since we run all our MongoDB instances with SSL it would be nice, if there is a possibility to specify these extra_options in the connection string:

Since genghis uses Mongo::Connection.from_uri this should be an easy task ;-)

Connection options and extra options of the mongo driver (GENERIC_OPTS and CONNECTION_OPTS):

Example of a working connection string:

con = Mongo::Connection.from_uri('mongodb://', :ssl => true)

Thanks for this great app!

Copy link

bobthecow commented Nov 12, 2012

Support for ssl has been added to the develop branch. Check it out and let me know if anything's broken :)

A style note: since the server URIs use the standard Mongo connection string format, I'm expecting the query param style rather than the ruby opt style names. For example, you would use connectTimeoutMS rather than :connection_timeout.

Genghis (.rb) currently only supports replicaSet, connectTimeoutMS and ssl. All queries are done with safe, so that option doesn't make sense to set at the server level. I don't want to support slaveOkay (at least until Genghis supports read-only users, but possibly ever). If you need to connect to a slave, just connect directly to the slave...

The rest of the options seem to be unsupported at the connection level by the Ruby driver, so they'll take a bit more to integrate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

1 participant