You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "François de Parscau (Jira)" <ji...@apache.org> on 2026/01/08 15:20:00 UTC

[jira] [Created] (CAMEL-22830) ReplayId ignored when using multiple routes with same salesforce channel

François de Parscau created CAMEL-22830:
-------------------------------------------

             Summary: ReplayId ignored when using multiple routes with same salesforce channel
                 Key: CAMEL-22830
                 URL: https://issues.apache.org/jira/browse/CAMEL-22830
             Project: Camel
          Issue Type: Bug
          Components: camel-salesforce
    Affects Versions: 4.8.1
            Reporter: François de Parscau


We've found a problem in the way the replayId is handled in the camel-salesforce component.
{code:java}
SalesforceComponent sf2 = new SalesforceComponent();
sf2.setLoginConfig(loginConfig);
sf2.setLazyStartProducer(true);
camelContext.addComponent("salesforcesub", sf2);

SalesforceComponent sf3 = new SalesforceComponent();
sf3.setLoginConfig(loginConfig);
sf3.setLazyStartProducer(true);
camelContext.addComponent("salesforcesubnoreplay", sf3);
...
//Route 1:
salesforcesub://subscribe:event/Talend_to_ST_Event__e?rawPayload=true&replayId=-2&bridgeErrorHandler=true

//Route 2 :
salesforcesubnoreplay://subscribe:event/Talend_to_ST_Event__e?rawPayload=true&replayId=-1&bridgeErrorHandler=true
{code}
With this setup, both routes will use replayId=-2 because this is store in a static map of the subscriptionHelper and key is the channelName (here Talend_to_ST_Event)
This map causes also issues in an OSGI environment : since the bundle containing camel-salesforce code is different from the route, restarting the route does not reset the Map, so it does not read all the event from sales force.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)