camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sune Keller (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-10849) Salesforce: subscription channel created per component
Date Thu, 23 Feb 2017 12:51:44 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-10849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880369#comment-15880369
] 

Sune Keller edited comment on CAMEL-10849 at 2/23/17 12:51 PM:
---------------------------------------------------------------

[~lb] I agree about logging; though it is possible to see already it if you enable debug logging
level for the CometD client, as it is part of the subscribe message payload, and you could
log it in your consuming route by reading the corresponding exchange header.

As per the current naming, it is to signify that unless you specify initial {{replayId}} values
per channel using the {{initialReplayIdMap}}, the default specified by {{defaultReplayId}}
should be used.

Use case:
Keep 3 instances of a service running that subscribe to the same topic. They use Idempotent
Consumer (http://camel.apache.org/idempotent-consumer.html) to only process each message once,
but at the end of each route, the replayId from the message is stored, e.g. in Redis with
a 24h TTL (since replayIds older than that are invalid anyway). When the application starts
up, the initial replayIds are read from Redis and populated into the {{initialReplayIdMap}}.
Topics for which no replayId is stored (or it expired per TTL) will then have {{defaultReplayId}}
instead.

Does that make sense?


was (Author: sirlatrom):
I agree about logging; though it is possible to see already it if you enable debug logging
level for the CometD client, as it is part of the subscribe message payload, and you could
log it in your consuming route by reading the corresponding exchange header.

As per the current naming, it is to signify that unless you specify initial {{replayId}} values
per channel using the {{initialReplayIdMap}}, the default specified by {{defaultReplayId}}
should be used.

Use case:
Keep 3 instances of a service running that subscribe to the same topic. They use Idempotent
Consumer (http://camel.apache.org/idempotent-consumer.html) to only process each message once,
but at the end of each route, the replayId from the message is stored, e.g. in Redis with
a 24h TTL (since replayIds older than that are invalid anyway). When the application starts
up, the initial replayIds are read from Redis and populated into the {{initialReplayIdMap}}.
Topics for which no replayId is stored (or it expired per TTL) will then have {{defaultReplayId}}
instead.

Does that make sense?

> Salesforce: subscription channel created per component
> ------------------------------------------------------
>
>                 Key: CAMEL-10849
>                 URL: https://issues.apache.org/jira/browse/CAMEL-10849
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-salesforce
>            Reporter: Luca Burgazzoli
>            Assignee: Zoran Regvart
>             Fix For: 2.19.0
>
>
> If I creates two salesforce consumers, I can't set different options per channel as the
client is configured on component level so i.e. you can't set a per channel replay id as only
the first one is taken into account:
> {code:java}
>     from('salesforce:comments-1?updateTopic=true&sObjectQuery=SELECT Id, CommentId__c
FROM Comment_Event__c')
>         .to("log:salesforce-comments?level=INFO&showHeaders=false&multiline=false")
>     from('salesforce:comments-2?updateTopic=true&sObjectQuery=SELECT Id FROM Case')
>         .to("log:salesforce-cases?level=INFO&showHeaders=false&multiline=false")
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message