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 cluster of mongoDB #2

Closed
natrem opened this issue Feb 7, 2019 · 5 comments · Fixed by #3
Closed

Support cluster of mongoDB #2

natrem opened this issue Feb 7, 2019 · 5 comments · Fixed by #3

Comments

@natrem
Copy link

natrem commented Feb 7, 2019

Current configuration of the DAO supports one host and port.
MongoClient supports a list of servers.
In the context I work in I'd rather use this feature to deploy para separately from my storage backends.
I'm willing to provide a PR for this feature.
Are you ok with following configuration changes?

# mongodb uri as specified by [MongoClientURI](https://mongodb.github.io/mongo-java-driver/3.4/javadoc/com/mongodb/MongoClientURI.html)
# mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]
mongodb.uri=

To follow backwards compatibility this value would be null by default and override the definition of host and port (since they have a default value in MongoDBUtils

@albogdano
Copy link
Member

@natrem Thanks for the suggestion! Please have a look at the changes in d9425c3 and if you're ok with that I'll publish a new release today.

@natrem
Copy link
Author

natrem commented Feb 8, 2019

When using your implementation we must pass an inet address and not an URI.
More specifically you cannot pass a URI containing several hosts and rely on MongoDb cluster discovery.
Since you like the idea I'll push my code.

natrem added a commit to natrem/para-dao-mongodb that referenced this issue Feb 8, 2019
@albogdano
Copy link
Member

Thanks for the pull request! I'm going to publish it to maven if you're OK with these changes.

@albogdano
Copy link
Member

Published 1.31.2 on Maven.

@natrem
Copy link
Author

natrem commented Feb 12, 2019

Thank you for the product 👍 (and the release)

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

Successfully merging a pull request may close this issue.

2 participants