[
https://issues.apache.org/jira/browse/CAMEL-9713?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15196282#comment-15196282
]
Joe Luo commented on CAMEL-9713:
--------------------------------
I am afraid that it won't work with changes on JettyHttpEndpoint.java only. We
still need to change JettyHttpComponent.java class createEndpoint method to
resolve the "httpClient" option and then set the HttpClient to the endpoint:
{code}
protected Endpoint createEndpoint(String uri, String remaining, Map<String,
Object> parameters) throws Exception {
...
HttpClient httpClient = resolveAndRemoveReferenceParameter(parameters,
"httpClient", HttpClient.class);
...
if (httpClient != null) {
endpoint.setHttpClient(httpClient);
}
...
{code}
> Can not set custom Jetty HttpClient to producer endpoint
> --------------------------------------------------------
>
> Key: CAMEL-9713
> URL: https://issues.apache.org/jira/browse/CAMEL-9713
> Project: Camel
> Issue Type: Bug
> Components: camel-jetty
> Affects Versions: 2.15.1
> Reporter: Joe Luo
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 2.17.0
>
> Attachments: camel-jetty-shared-client-patch.txt
>
>
> The camel-jetty page has a "httpClient" option that can be set on camel-jetty
> producer endpoint and it says:
> {code}
> To use a shared org.eclipse.jetty.client.HttpClient for all producers created
> by this endpoint. This option should only be used in special circumstances.
> This option should only be used in special circumstances.
> {code}
> In some cases, user might want to set a shard Jetty HttpClient among
> camel-jetty producer endpoints. For instance, user might use recipientList
> with camel-jetty producer endpoint to support multiple dynamically created
> URLs. So setting a shared Jetty HttpClient with a shared thread pool would be
> ideal to avoid exploding number of producer endpoints + their own producer
> thread pools in this use case. However, there is no way to set it to
> camel-jetty producer endpoint.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)