[JAVA-3114] Deprecate ConnectionString streamType property Created: 06/Dec/18  Updated: 28/Oct/23  Resolved: 13/Dec/18

Status: Closed
Project: Java Driver
Component/s: Configuration
Affects Version/s: None
Fix Version/s: 3.10.0

Type: Improvement Priority: Major - P3
Reporter: Jeffrey Yemin Assignee: Jeffrey Yemin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to JAVA-2884 ConnectionString streamType not appli... Closed
related to JAVA-3038 Add built-in support for TLS in the a... Closed
related to JAVA-3037 Move Netty stream support to a separa... Closed

 Description   

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).


 Comments   
Comment by Githook User [ 14/Jan/19 ]

Author:

{'username': 'jyemin', 'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin'}

Message: Deprecate streamType connection string query parameter

  • Deprecate ConnectionString#getStreamType
  • Update ConnectionString Javadoc
  • And a warning to the logs if it's used
  • Update async reference documentation

JAVA-3114
Branch: 3.10.x
https://github.com/mongodb/mongo-java-driver/commit/5248874aa7713612bc0889799ef06406dd50b600

Comment by Githook User [ 13/Dec/18 ]

Author:

{'username': 'jyemin', 'email': 'jeff.yemin@10gen.com', 'name': 'Jeff Yemin'}

Message: Deprecate streamType connection string query parameter

  • Deprecate ConnectionString#getStreamType
  • Update ConnectionString Javadoc
  • And a warning to the logs if it's used
  • Update async reference documentation

JAVA-3114
Branch: master
https://github.com/mongodb/mongo-java-driver/commit/2874d644aec7b3c4fe058d6139fb93933cc0724d

Comment by Jeffrey Yemin [ 06/Dec/18 ]

Consider doing the second two items in the 3.9 time frame (patch release + reference doc update)

Generated at Thu Feb 08 08:58:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.