-
Type:
Task
-
Resolution: Unresolved
-
Priority:
Unknown
-
None
-
Affects Version/s: 5.6.4
-
Component/s: Networking
-
None
-
Java Drivers
-
None
-
None
-
None
-
None
-
None
-
None
SocketStream configures jdk.net.ExtendedSocketOptions.TCP_KEEPIDLE/TCP_KEEPCOUNT/TCP_KEEPINTERVAL in addition to enabling the TCP keep-alive mechanism.
- It looks like AsynchronousSocketChannelStream, TlsChannelStream can trivially do the same.
- NettyStream can do the same, though not as straightforward. There is:
- NioChannelOption.of, which can be used to specify jdk.net.ExtendedSocketOptions.TCP_KEEPIDLE/TCP_KEEPCOUNT/TCP_KEEPINTERVAL when NioSocketChannel is used.
- EpollChannelOption.TCP_KEEPIDLE/TCP_KEEPCNT/TCP_KEEPINTVL, which can be used when EpollSocketChannel is used.
- IoUringChannelOption.TCP_KEEPIDLE/TCP_KEEPCNT/TCP_KEEPINTVL, which can be used when IoUringSocketChannel is used.
Note that applications may configure the SocketChannel used by Netty via com.mongodb.connection.NettyTransportSettings.Builder.socketChannelClass.
For additional info see