Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-5505

Rationale for removing MongoClientSettings.Builder#streamFactoryFactory in 5.0 release

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Async, Configuration
    • None
    • Java Drivers
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Hello,

      I was digging into MongoDB java driver version 5 (I'm currently running version 4) and I noticed that, despite some objects being migrated to the package com.mongodb.internal.connection, some of them are not available anymore; specifically there is no way to set a stream factory to the MongoClientSettings' Builder.

      This means that, there is no way to set an AsynchronousChannelGroup to the driver.

      If you have a look at here: https://github.com/mongodb/mongo-java-driver/blob/98934ddc52efa48e7e3b41339e57ff4c8dc89322/driver-core/src/main/com/mongodb/internal/connection/AsynchronousSocketChannelStream.java#L80

      There is no way anymore to set a custom AsynchronousChannelGroup.

      For instance let's say I want to provide a specific group, taking the ownership to manage an internal executor service (eventually manage its lifecycle), there is no way anymore to do such a thing.

      Is there any reason why this feature has been removed?

      Thanks,

      Matteo.

       

            Assignee:
            maxim.katcharov@mongodb.com Maxim Katcharov
            Reporter:
            matteo.cristoforo@gmail.com matteo cristoforo
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: