Hi,
As mentioned in vertx-core Java guide (
https://vertx.io/docs/vertx-core/java/#_native_transports), one can enable native transport to get more TCP features and to get better network throughput - correct me if I'm wrong. To do so, we need to include
netty-transport-native-epoll dependency, and enable it in Launch code, like below:
public class VertxLauncher extends Launcher {
private static final Logger LOG = LoggerFactory.getLogger(VertxLauncher.class);
public static void main(String[] args) {
new VertxLauncher().dispatch(args);
}
@Override
public void beforeStartingVertx(VertxOptions options) {
LOG.info("Starting application...");
options.setPreferNativeTransport(true);
}
@Override
public void afterStartingVertx(Vertx vertx) {
boolean usingNative = vertx.isNativeTransportEnabled();
LOG.info("Is running with native transport: {}", usingNative); // ----------> This is printing 'false' on Windows.
}
}
SslContext sslContext =
SslContextBuilder.forServer(certificate, privateKey)
.sslProvider(SslProvider.OPENSSL)
.build();
Question: What is the relation between these
w.r.to Vert.x as doc mentions native transport. I thought netty-transport-native-epoll, which Vertx depends on for native transport, uses netty-tcnative internally. But I couldn't see the dependency on it. And
vertx.isNativeTransportEnabled() is returning '
false' even I included both '
netty-tcnative-boringssl-static' and '
netty-transport-native-epoll'. As per Netty doc, '
netty-tcnative-boringssl-static' has native libs for Windows as well.
Thanks,
Manikanta G