[
https://issues.apache.org/jira/browse/CAMEL-14291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jan Bednar resolved CAMEL-14291.
--------------------------------
Resolution: Not A Bug
The order of events is not guaranteed -
[https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/using_streaming_api_message_order.htm]
If you expect events sorted by createdDate, you need to sort it yourself (Eg
with [Resequence
EIP|https://camel.apache.org/manual/latest/resequence-eip.html])
> Salesforce component uses wrong order of received messages
> ----------------------------------------------------------
>
> Key: CAMEL-14291
> URL: https://issues.apache.org/jira/browse/CAMEL-14291
> Project: Camel
> Issue Type: Bug
> Components: camel-salesforce
> Affects Versions: 3.0.0.RC3
> Reporter: Andrey Tyurin
> Priority: Major
>
> When several events are received from Salesforce they are processed in wrong
> order for createdDate field:
>
> 2019-12-11 14:01:40.751 [SalesforceHttpClient@4eac29e0-142] DEBUG
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper$5
> - Received messages
> [{data={event={createdDate={color:#ff0000}2019-12-11T22:01:40.258Z{color},
> replayId=15230, type=deleted}, sobject=\\{Id=0JRf4000003pfDYGAY}},
> channel=/topic/ExtRoutPsr},
> {data={event={createdDate={color:#ff0000}2019-12-11T22:01:40.073Z{color},
> replayId=10779, type=updated}, sobject=\\{Status=3, IsDeleted=false,
> UserId=005f4000001gXxkAAE, ServiceChannelId=0N9f4000000M9YjCAK,
> DeclineReason=null, WorkItemId=500f400000NOxKNAA1, Id=0Bzf4000005akscCAA,
> PendingServiceRoutingId=0JRf4000003pfDYGAY}},
> channel=/topic/ExtRoutAgentWork}, \\{channel=/meta/connect, id=29,
> successful=true}]
> {color:#ff0000}2019-12-11 14:01:40.751{color}
> [SalesforceHttpClient@4eac29e0-142] DEBUG
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper -
> Received Message:
> {data={event={createdDate={color:#ff0000}2019-12-11T22:01:40.258Z{color},
> replayId=15230, type=deleted}, sobject=\{Id=0JRf4000003pfDYGAY}},
> channel=/topic/ExtRoutPsr}
> {color:#ff0000}2019-12-11 14:01:40.752{color}
> [SalesforceHttpClient@4eac29e0-142] DEBUG
> org.apache.camel.component.salesforce.internal.streaming.SubscriptionHelper -
> Received Message:
> {data={event={createdDate={color:#ff0000}2019-12-11T22:01:40.073Z,{color}
> replayId=10779, type=updated}, sobject=\{Status=3, IsDeleted=false,
> UserId=005f4000001gXxkAAE, ServiceChannelId=0N9f4000000M9YjCAK,
> DeclineReason=null, WorkItemId=500f400000NOxKNAA1, Id=0Bzf4000005akscCAA,
> PendingServiceRoutingId=0JRf4000003pfDYGAY}}, channel=/topic/ExtRoutAgentWork}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)