Skip to content

Conversation

@f2par0
Copy link

@f2par0 f2par0 commented Dec 13, 2025

Description

static REPLAY_EXTENSION is shared across all bundles and stores replayId even when the consumer is shutdown.
Having it linked to the component makes it destroyed when a bundle is uninstalled.

With this fix, we can instanciate different components to be able have different replay ID for each consumer.
Example :

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

SalesforceComponent sf3 = new SalesforceComponent();
sf3.setLoginConfig(loginConfig2);
sf3.setLazyStartProducer(true);
camelContext.addComponent("salesforcesubnoreplay", sf3);

Target

  • I checked that the commit is targeting the correct branch (Camel 4 uses the main branch)

Tracking

  • If this is a large change, bug fix, or code improvement, I checked there is a JIRA issue filed for the change (usually before you start working on it).

Apache Camel coding standards and style

  • I checked that each commit in the pull request has a meaningful subject line and body.
  • I have run mvn clean install -DskipTests locally from root folder and I have committed all auto-generated changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants