Thanks Simone. This means that we should upgrade to Jetty v 9.4.x in order to leverage many efficient features.
Additionally, another thing that I would like to clarify with 9.3.x is regarding proxy usage.
We create a high level HTTPClient that uses the HttpClientTransportOverHTTP2 and makes use of the lower level Http2Client to execute HTTP/2 requests.
Now, we set the proxy configuration on the high level HTTP Client object.
1. Is it OK to set a HTTP/1 forward proxy server to act as a tunnel for HTTP/2 requests?
2. Also it seems that we cannot tunnel HTTPS requests using HTTP/1 proxy server to HTTP/2 server.
3. In my unit tests, I set up a simple HTTP/1 server as proxy server and a HTTP/2 server as the target end point. Any requests sent directly to my local HTTP/2 server complete successfully. However, when I try to tunnel the same requests using the local proxy server, I end up getting the following exception:
Caused by: java.nio.channels.ClosedChannelException
at org.eclipse.jetty.http2.HTTP2Session.onShutdown(HTTP2Session.java:818)
at org.eclipse.jetty.http2.HTTP2Connection$HTTP2Producer.produce(HTTP2Connection.java:191)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:162)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:101)
at org.eclipse.jetty.http2.HTTP2Connection.onOpen(HTTP2Connection.java:81)
at org.eclipse.jetty.http2.client.HTTP2ClientConnectionFactory$HTTP2ClientConnection.onOpen(HTTP2ClientConnectionFactory.java:148)
at org.eclipse.jetty.io.SelectorManager.connectionOpened(SelectorManager.java:307)
at org.eclipse.jetty.io.ManagedSelector.createEndPoint(ManagedSelector.java:414)
at org.eclipse.jetty.io.ManagedSelector.access$1600(ManagedSelector.java:56)
at org.eclipse.jetty.io.ManagedSelector$CreateEndPoint.run(ManagedSelector.java:587)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceAndRun(ExecuteProduceConsume.java:213)
at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.execute(ExecuteProduceConsume.java:101)
at org.eclipse.jetty.io.ManagedSelector.run(ManagedSelector.java:136)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:654)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:572)
at java.lang.Thread.run(Thread.java:745)
Not sure if I am missing something here, but any hints/inputs would help me in going further.
Thanks
Neha