-
Type: Improvement
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Configuration
-
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:
- 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.
- 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.
- 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:
- 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
- A runtime log warning generated by ConnectionString for any use of the streamType query parameter in the connection string supplied to its constructor
- Updates to the reference documentation indicating the preferred method of enabling Netty (via streamFactoryFactory property of MongoClientSettings).