You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "EDGAR CHERNICK (Jira)" <ji...@apache.org> on 2020/06/23 21:47:00 UTC

[jira] [Updated] (CAMEL-15233) CometDReplayExtension does not keep replayId for each message/channel

     [ https://issues.apache.org/jira/browse/CAMEL-15233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

EDGAR CHERNICK updated CAMEL-15233:
-----------------------------------
    Description: 
CometDReplayExtension class try to read the replayId from the message by doing 
{code}
final Object value = message.get(EXTENSION_NAME);
{code}
However, the replayId (based on this [https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/using_streaming_api_durability.htm]) is actually within data -> event -> replayId.

 By doing the following
{code}
 final Map<String, Object> data = (Map<String, Object>) message.get("data");
 final Map<String, Object> event = (Map<String, Object>) data.get("event");

final Object value = event.get("replayId");
{code}
I was able to properly fetch the replayId from the message.

 Since the current version does not do this properly, If the component loses the connection and has to subscribe again it will use the replayid value from the endpoint which it will be outdated if any message was read before the connection failure.

  was:
CometDReplayExtension class try to read the replayId from the message by doing 

final Object value = message.get(EXTENSION_NAME);

However, the replayId (based on this [https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/using_streaming_api_durability.htm]) is actually within data -> event -> replayId.

 By doing the following

 final Map<String, Object> data = (Map<String, Object>) message.get("data");
 final Map<String, Object> event = (Map<String, Object>) data.get("event");

final Object value = event.get("replayId");

I was able to properly fetch the replayId from the message.

 Since the current version does not do this properly, If the component loses the connection and has to subscribe again it will use the replayid value from the endpoint which it will be outdated if any message was read before the connection failure.


> CometDReplayExtension does not keep replayId for each message/channel
> ---------------------------------------------------------------------
>
>                 Key: CAMEL-15233
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15233
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-salesforce
>            Reporter: EDGAR CHERNICK
>            Priority: Major
>
> CometDReplayExtension class try to read the replayId from the message by doing 
> {code}
> final Object value = message.get(EXTENSION_NAME);
> {code}
> However, the replayId (based on this [https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/using_streaming_api_durability.htm]) is actually within data -> event -> replayId.
>  By doing the following
> {code}
>  final Map<String, Object> data = (Map<String, Object>) message.get("data");
>  final Map<String, Object> event = (Map<String, Object>) data.get("event");
> final Object value = event.get("replayId");
> {code}
> I was able to properly fetch the replayId from the message.
>  Since the current version does not do this properly, If the component loses the connection and has to subscribe again it will use the replayid value from the endpoint which it will be outdated if any message was read before the connection failure.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)