I was attempting to use Http2SolrClient in a simple test application. I
am using SolrJ 9.1.0 pulled as a dependency with Gradle.
https://paste.elyograg.org/view/f9bbe53c
Solr is 9.2.0-SNAPSHOT, behind a TLS-enabled proxy. Solr itself is
running in cloud mode on port 8983 without TLS, the proxy makes it
available via https on port 443. The proxy supports all versions of HTTP.
In the code linked, if I comment the usage of Http2SolrClient, uncomment
the usage of HttpSolrClient, and fix the imports, everything works.
I couldn't get Http2SolrClient to work at all without giving it an
SSLConfig object. Jetty HttpClient throws NPE saying it does not have
SslContextFactory. With HttpSolrClient I don't have to do anything with
SSL config, it just works.
If I don't add "sc.close();" when using Http2SolrClient then the program
never exits. I imagine a try-with-resources would also work. I do
realize that proper cleanup in a long-running program requires using
close, but if the program ends, I would think that should work with or
without doing proper cleanup.
I think this must mean that Jetty HttpClient is starting "normal"
threads rather than daemon threads, and this might be something I need
to discuss with the Jetty project, but I thought I would ask here first.
Thanks,
Shawn