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

Deprecate ConnectionString streamType property

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.10.0
    • Affects Version/s: None
    • Component/s: Configuration
    • Labels:
      None

      The streamType property on ConnectionString (and associated streamType query parameter in the URI string) allows an application to easily enable Netty. This is problematic for a number of reasons:

      1. It interacts poorly with MongoClientSettings#applyConnectionString, as that method ignores the streamType property. The fix for this is would probably require an addition to the MongoClientSettings API that would conflict with and duplicate the streamFactoryFactory property.
      2. There is a goal in 4.0 to externalize the Netty dependency into a separate package, so including support for Netty in the core package would create a circular dependency.
      3. There is a goal in 4.0 for the driver to natively handle async TLS connections, which is currently the main reason for the tight integration with Netty.

      For these reasons, we plan to deprecate the streamType property and remove support in 4.0. Deprecation should include:

      1. The usual Java annotation/Javadoc deprecation of ConnectionString#getStreamType. This isn't all that helpful though since it's the driver itself that typically is calling this method
      2. A runtime log warning generated by ConnectionString for any use of the streamType query parameter in the connection string supplied to its constructor
      3. Updates to the reference documentation indicating the preferred method of enabling Netty (via streamFactoryFactory property of MongoClientSettings).

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: