Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Atlas
Created by Guest
Created on Jun 2, 2023

Improve the sample code for Connecting with MongoDB Driver

When in Atlas you click the Connect button and get to the screen 'Connecting with MongoDB Driver', the Java sample isn't using the MongoClientSettings.builder() to set writeConcern and retryWrites. This is done in the connect string instead, even though the builder does provide those two settings. I suggest only using the MongoClientSettings.builder() for better type safety.
  • Attach files