[
https://issues.apache.org/jira/browse/CAMEL-10495?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Luca Burgazzoli updated CAMEL-10495:
------------------------------------
Description:
In SubscriptionHelper all the configuration options hare retrieved using
component's configuration but that may be different from endpoint
configuration, as example in SubscriptionHelper.createClient :
{code:java}
Map<String, Integer> replayIdMap =
component.getConfig().getInitialReplayIdMap();
if (replayIdMap != null) {
replayId = replayIdMap.get(channelName);
}
if (replayId == null) {
replayId = component.getConfig().getDefaultReplayId();
}
{code}
The main issue is that the component uses the same configuration as the
endpoint so one would expect to be able to set any option available in
SalesforceEndpointConfig i.e. on the uri but that won't work:
{code:java}
from("salesforce:my-stream-1?defaultReplayId=-1")
.to("...")
from("salesforce:my-stream-2?defaultReplayId=-2")
.to("...")
{code}
It would be nice to remove "global" options from SalesforceEndpointConfig as
they are misleading or always use the configuration from the endpoint.
was:
In SubscriptionHelper all the configuration options hare retrieved using
component's configuration but that may be different from endpoint
configuration, as example in SubscriptionHelper.createClient :
{code:java}
Map<String, Integer> replayIdMap =
component.getConfig().getInitialReplayIdMap();
if (replayIdMap != null) {
replayId = replayIdMap.get(channelName);
}
if (replayId == null) {
replayId = component.getConfig().getDefaultReplayId();
}
{code}
The main issue is that the component uses the same configuration as the
endpoint so one would expect to be able to set any option available in
SalesforceEndpointConfig i.e. on the uri but that won't work:
{code:java}
from("salesforce:my-stram-1?defaultReplayId=-1")
.to("...")
from("salesforce:my-stram-2?defaultReplayId=-2")
.to("...")
{code}
It would be nice to remove "global" options from SalesforceEndpointConfig as
they are misleading or always use the configuration from the endpoint.
> camel-salesforce: EndpointConfiguration not taken into account by
> SubscriptionHelper
> ------------------------------------------------------------------------------------
>
> Key: CAMEL-10495
> URL: https://issues.apache.org/jira/browse/CAMEL-10495
> Project: Camel
> Issue Type: Bug
> Components: camel-salesforce
> Environment:
> Reporter: Luca Burgazzoli
> Fix For: 2.19.0
>
>
> In SubscriptionHelper all the configuration options hare retrieved using
> component's configuration but that may be different from endpoint
> configuration, as example in SubscriptionHelper.createClient :
> {code:java}
> Map<String, Integer> replayIdMap =
> component.getConfig().getInitialReplayIdMap();
> if (replayIdMap != null) {
> replayId = replayIdMap.get(channelName);
> }
> if (replayId == null) {
> replayId = component.getConfig().getDefaultReplayId();
> }
> {code}
> The main issue is that the component uses the same configuration as the
> endpoint so one would expect to be able to set any option available in
> SalesforceEndpointConfig i.e. on the uri but that won't work:
> {code:java}
> from("salesforce:my-stream-1?defaultReplayId=-1")
> .to("...")
> from("salesforce:my-stream-2?defaultReplayId=-2")
> .to("...")
> {code}
> It would be nice to remove "global" options from SalesforceEndpointConfig as
> they are misleading or always use the configuration from the endpoint.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)