Search code examples
javasalesforcecometd

Salesforce streaming API: Getting events after network failure and before resubscribe


I am looking for implementation of CDC(Change Data Capture) for Salesforce using Streaming APIs. I have gone thorugh the documents that are provided and I am able to use the code provided in the documentation. Through the code:

1-I am able to get the events at the client side for any change in Salesforce object.

2- While network failure I am able to reconnect and resubscribe the channel and able to get the new events as suggested in the document.(through subscribe in handshake receive).

My question is, how to get those events which were generated after the network failure and before the resubscription?

I appriciate any help on this.


Solution

  • The issue was with the datamap that I was sending to the extension. I was using the "ReplayId" as key for sending the replayid. Correct key was channel name. Now everything works fine.