You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Jeremy Ross (Jira)" <ji...@apache.org> on 2022/03/12 22:38:00 UTC

[jira] [Comment Edited] (CAMEL-17705) Camel Salesforce - Http Client timout is hardcoded

    [ https://issues.apache.org/jira/browse/CAMEL-17705?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17505355#comment-17505355 ] 

Jeremy Ross edited comment on CAMEL-17705 at 3/12/22, 10:37 PM:
----------------------------------------------------------------

[~jawwad124] The timeout values do get [set in the client|https://github.com/apache/camel/blob/fd35990ed5e2d5d743e4a9c2137b86f5cc170961/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java#L933-L934].  

 

You probably need to set idle timeout. Try this:

{{camel.component.salesforce.http-client-idle-timeout=360000}}


was (Author: jeremyross):
[~jawwad124] The timeout values do get [set in the client|[https://github.com/apache/camel/blob/fd35990ed5e2d5d743e4a9c2137b86f5cc170961/components/camel-salesforce/camel-salesforce-component/src/main/java/org/apache/camel/component/salesforce/SalesforceComponent.java#L933-L934].]  

 

You probably need to set idle timeout. Try this:

{{camel.component.salesforce.http-client-idle-timeout=360000}}

> Camel Salesforce - Http Client timout is hardcoded
> --------------------------------------------------
>
>                 Key: CAMEL-17705
>                 URL: https://issues.apache.org/jira/browse/CAMEL-17705
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-salesforce
>    Affects Versions: 3.14.0, 3.15.0
>            Reporter: Jawad Ahmad
>            Assignee: Ramu
>            Priority: Major
>
> I am using Bulk V2 API to upload large files to Salesforce. I have noticed that on creating the job from Producer it times out with Timeout exception. I tried to change the timeout configuration but noticed its always gets set to a hardcoded one.
> Class : SalesforceComponent
> {code:java}
> static SalesforceHttpClient createHttpClient(
>             Object source, final SslContextFactory sslContextFactory, final CamelContext context, int workerPoolSize,
>             int workerPoolMaxSize) {
>         SecurityUtils.adaptToIBMCipherNames(sslContextFactory);
>         final SalesforceHttpClient httpClient = new SalesforceHttpClient(
>                 context, context.getExecutorServiceManager().newThreadPool(source, "SalesforceHttpClient", workerPoolSize,
>                         workerPoolMaxSize),
>                 sslContextFactory);
>         // default settings, use httpClientProperties to set other
>         // properties
>         httpClient.setConnectTimeout(CONNECTION_TIMEOUT);
>         httpClient.setIdleTimeout(IDLE_TIMEOUT);
>         return httpClient;
>     }
> {code}
> As suggested by Claus to use httpClientProperties. In that case, HTTP client does set the connection timeout of the configured value. But it passes timeout value to SalesforceSession instead of ConnectionTimeout value. So it still gets failed with a Timeout error.
> Class : SalesforceComponent
> Method: doStart
> {code:java}
>  setupHttpClient(httpClient, getCamelContext(), httpClientProperties);
> // support restarts
> if (session == null) {
> session = new SalesforceSession(getCamelContext(), httpClient, httpClient.getTimeout(), loginConfig);
>         }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.1#820001)