[ https://issues.apache.org/jira/browse/CAMEL-21609?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jawad Ahmad updated CAMEL-21609: -------------------------------- Description: I recently upgraded my Camel application from Camel 3.2.1 and Java 11 to Camel 4.9.0 and JDK 21. I am now seeing a lot of blocked threads in thread monitoring. I noticed it when my application started handing up during testing. I test on 4.4.4, 4.8.2, and Java 11 as well. But seeing the same blocking there, Threads are blocked in SalesforceHttpClient. I also profiled my older Java 11 and Camel 3.2.1 instances, and there is no blockage whatsoever. It works fine without any thread blocking. Details: I am subscribing to the Salesforce platform event and simply doing a query from my processor using the Producer Template. A simple route like this blocks 2 threads on SalesforceHttpClient. {code:java} from("timer:test-timer?delay=30s&period=30s") .log(LoggingLevel.INFO, "Querying salesforce data") .process(exchange -> { exchange.getMessage().setHeader(SalesforceEndpointConfig.SOBJECT_QUERY, getSettingsQuery()); exchange.getMessage().setHeader(SalesforceEndpointConfig.SOBJECT_CLASS, QueryRecordsSettings__c.class.getName()); }) .to("salesforce:query") .log(LoggingLevel.INFO, "*** Settings : ${body}") .end(); {code} !image-2025-01-10-22-14-21-559.png! !image-2025-01-10-22-13-38-588.png! was: I recently upgraded my Camel application from Camel 3.2.1 and Java 11 to Camel 4.9.0 and JDK 21. I am now seeing a lot of blocked threads in thread monitoring. I noticed it when my application started handing up during testing. I test on 4.4.4, 4.8.2, and Java 11 as well. But seeing the same blocking there, Threads are blocked in SalesforceHttpClient. I also profiled my older Java 11 and Camel 3.2.1 instances, and there is no blockage whatsoever. It works fine without any thread blocking. Details: I am subscribing to the Salesforce platform event and simply doing a query from my processor using the Producer Template. A simple route like this blocks 2 threads on SalesforceHttpClient. {code:java} from("timer:time2?delay=30s&period=30s") .log(LoggingLevel.INFO, "Querying salesforce data") .process(exchange -> { exchange.getMessage().setHeader(SalesforceEndpointConfig.SOBJECT_QUERY, getSettingsQuery()); exchange.getMessage().setHeader(SalesforceEndpointConfig.SOBJECT_CLASS, QueryRecordsgsage__Sage_Settings__c.class.getName()); }) .to("salesforce:query") .log(LoggingLevel.INFO, "*** Settings : ${body}") .end(); {code} !image-2025-01-10-22-14-21-559.png! !image-2025-01-10-22-13-38-588.png! > Blocked Threads After Upgrade > ----------------------------- > > Key: CAMEL-21609 > URL: https://issues.apache.org/jira/browse/CAMEL-21609 > Project: Camel > Issue Type: Bug > Components: camel-core, camel-salesforce > Affects Versions: 4.4.4, 4.8.2, 4.9.0 > Reporter: Jawad Ahmad > Priority: Major > Attachments: image-2025-01-10-22-13-38-588.png, > image-2025-01-10-22-14-21-559.png > > > I recently upgraded my Camel application from Camel 3.2.1 and Java 11 to > Camel 4.9.0 and JDK 21. > I am now seeing a lot of blocked threads in thread monitoring. I noticed it > when my application started handing up during testing. I test on 4.4.4, > 4.8.2, and Java 11 as well. But seeing the same blocking there, Threads are > blocked in SalesforceHttpClient. > I also profiled my older Java 11 and Camel 3.2.1 instances, and there is no > blockage whatsoever. It works fine without any thread blocking. > Details: > I am subscribing to the Salesforce platform event and simply doing a query > from my processor using the Producer Template. > A simple route like this blocks 2 threads on SalesforceHttpClient. > {code:java} > from("timer:test-timer?delay=30s&period=30s") > .log(LoggingLevel.INFO, "Querying salesforce data") > .process(exchange -> { > > exchange.getMessage().setHeader(SalesforceEndpointConfig.SOBJECT_QUERY, > getSettingsQuery()); > > exchange.getMessage().setHeader(SalesforceEndpointConfig.SOBJECT_CLASS, > QueryRecordsSettings__c.class.getName()); > }) > .to("salesforce:query") > .log(LoggingLevel.INFO, "*** Settings : ${body}") > .end(); > {code} > !image-2025-01-10-22-14-21-559.png! > !image-2025-01-10-22-13-38-588.png! -- This message was sent by Atlassian Jira (v8.20.10#820010)