-
Bug
-
Resolution: Done
-
Major
-
3.8.0.GA
-
False
-
-
False
-
-
-
-
Important
-
0
-
-
Component configuration:
from("salesforce:subscribe:/event/" + eventType + "?rawPayload=false" + "&replayId=" + replayId) .routeId("event_subscribe") .log("Received platform event: ${body}") .log("ReplayId ${header.CamelSalesforceReplayId}") .to("direct:salesforce_event");
Issue:
- The Camel Salesforce connector does not reconnect after a period of innactivity.
- The following log entry is shown at the moment of this issue:
2025-04-09 22:33:44,480 WARN [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #82 - SalesforceHttpClient) Connect failure: {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=71, error=403::Unknown client, successful=false} 2025-04-09 22:33:44,481 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #82 - SalesforceHttpClient) Handshaking after unexpected disconnect from Salesforce... 2025-04-09 22:33:49,734 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #84 - SalesforceHttpClient) Subscribing to channel /event/ReferralSubmitEvent__e... 2025-04-09 22:33:50,088 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (SalesforceHttpClient@19ea65f4-30) Subscribed to channel /event/ReferralSubmitEvent__e2025-04-10 14:29:11,372 WARN [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #722 - SalesforceHttpClient) Connect failure: {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=639, error=403::Unknown client, successful=false} 2025-04-10 14:29:11,373 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #722 - SalesforceHttpClient) Handshaking after unexpected disconnect from Salesforce... 2025-04-10 14:29:16,625 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #724 - SalesforceHttpClient) Subscribing to channel /event/ReferralSubmitEvent__e... 2025-04-10 14:29:16,892 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (SalesforceHttpClient@19ea65f4-28) Subscribed to channel /event/ReferralSubmitEvent__e2025-04-10 16:28:37,301 WARN [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #802 - SalesforceHttpClient) Connect failure: {advice={reconnect=handshake, interval=0}, channel=/meta/connect, id=710, error=403::Unknown client, successful=false} 2025-04-10 16:28:37,302 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #802 - SalesforceHttpClient) Handshaking after unexpected disconnect from Salesforce... 2025-04-10 16:28:42,555 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #804 - SalesforceHttpClient) Subscribing to channel /event/ReferralSubmitEvent__e... 2025-04-10 16:28:42,815 INFO [org.apa.cam.com.sal.int.str.SubscriptionHelper] (SalesforceHttpClient@19ea65f4-30) Subscribed to channel /event/ReferralSubmitEvent__e 2025-04-10 16:40:54,719 WARN [org.apa.cam.com.sal.int.str.SubscriptionHelper] (Camel (camel-1) thread #812 - SalesforceHttpClient) Connect failure: {failure={exception=java.io.EOFException: HttpConnectionOverHTTP@424ac113::SslEndPoint@72876280[{l=/192.168.228.98:60700,r=example--dev.sandbox.my.salesforce.com/34.211.108.45:443,OPEN,fill=-,flush=-,to=71373/0}], message={clientId=xxx, channel=/meta/connect, id=722, connectionType=long-polling}, connectionType=long-polling}, channel=/meta/connect, id=722, successful=false}
As a workaround, the Camel route needs to be restarted manually to restore the salesforce connection. Ideally, a manual restart should not be required — or at least there should be a way to handle the exception within the Camel route to force an endpoint restart. Unfortunately, the exception is handled internally by the org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper class, which prevents it from being managed within the route itself.
There are no Sub-Tasks for this issue.