Skip to content

Instantly share code, notes, and snippets.

@michaelklishin
Created February 28, 2013 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelklishin/507d91cd33eacd2de107 to your computer and use it in GitHub Desktop.
Save michaelklishin/507d91cd33eacd2de107 to your computer and use it in GitHub Desktop.
;; Connecting to a replica set with a couple of seeds
(let [^MongoClientOptions opts (mg/mongo-options :threads-allowed-to-block-for-connection-multiplier 300)
seeds [[\"192.168.1.1\" 27017] [\"192.168.1.2\" 27017] [\"192.168.1.1\" 27018]]
sas (map #(apply mg/server-address %) seeds)]
(mg/connect! sas opts))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment