-
Bug
-
Resolution: Done
-
Medium
-
Honolulu Release
dmaapClient library supports http proxy properties - ClientProperties.PROXY_USERNAME (jersey.config.client.proxy.username), ClientProperties.PROXY_PASSWORD (jersey.config.client.proxy.password), ClientProperties.PROXY_URI (jersey.config.client.proxy.uri). These properties (if set) along with other properties are passed to the ClientBuilder (javax.ws.rs.client.ClientBuilder) to create a new client instance. However, the proxy properties mentioned above are not used by the javax.ws.rs library as no connectorProvider is specified in the dmaapClient library resulting in the default connectorProvider (HttpUrlConnectorProvider) to be used and the default connectorProvider does not understand the jersey proxy properties. Please see -
- https://eclipse-ee4j.github.io/jersey.github.io/apidocs/latest/jersey/index.html?org/glassfish/jersey/client/HttpUrlConnectorProvider.html
- https://docs.oracle.com/javase/8/docs/api/java/net/doc-files/net-properties.html#Proxies
dmaapClient library should support a connectorProvider like ApacheConnectorProvider - https://eclipse-ee4j.github.io/jersey.github.io/apidocs/2.29.1/jersey/org/glassfish/jersey/apache/connector/ApacheConnectorProvider.html that understands the proxy properties specified in the DmapClientUtil.java class.
Following change was introduced in the setHttpClientProperties method of DmaapClientUtil class to test access to DMAAP MR via a http proxy -
if ((properties.getProperty(ClientProperties.PROXY_URI) != null) && !(properties.getProperty(ClientProperties.PROXY_URI).isEmpty())) { config.connectorProvider(new ApacheConnectorProvider()); }
On introducing the above change, SDNR was able to access DMAAP MR via the http proxy.
demskeq8 highstreetherbert , FYI...