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

DOCSP-41123: cxn options #40

Merged
merged 7 commits into from
Aug 21, 2024
Merged

Conversation

rustagir
Copy link
Collaborator

Pull Request Info

PR Reviewing Guidelines

JIRA - https://jira.mongodb.org/browse/DOCSP-41123
Staging - https://preview-mongodbrustagir.gatsbyjs.io/kotlin-sync/DOCSP-41123-options/connect/connection-options/

Self-Review Checklist

  • Is this free of any warnings or errors in the RST?
  • Did you run a spell-check?
  • Did you run a grammar-check?
  • Are all the links working?
  • Are the facets and meta keywords accurate?

Copy link

netlify bot commented Aug 20, 2024

👷 Deploy request for docs-kotlin-sync pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 580e9ec

Copy link
Collaborator

@mcmorisi mcmorisi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a small suggestion!

source/connect/connection-options.txt Show resolved Hide resolved
@rustagir rustagir requested a review from rozza August 20, 2024 19:34
change settings at runtime and can help you catch errors at compile time.

The following example shows how to set options when creating a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend adding a section just using the MongoClientSettings.builder eg:

        MongoClientSettings
            .builder()
            .applyToClusterSettings { it.hosts(listOf(ServerAddress("127.0.0.1"))) }
            .applyToSocketSettings { it.connectTimeout(60000, TimeUnit.MILLISECONDS) }
            .applyToSslSettings { it.enabled(true) }
            .build()

Then give the example below mixing a connection string and settings.

@rustagir rustagir requested a review from rozza August 21, 2024 14:12
Copy link
Member

@rozza rozza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@rustagir rustagir merged commit 5b290a2 into mongodb:master Aug 21, 2024
2 checks passed
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 this pull request may close these issues.

3 participants