You need to sign in to do that
Don't have an account?
Bhagyashree Jog
Salesforce platform event EMP Connector replay lost message
We are subscribing to Push Topics and Platform Events using CometD Subscriber using the code in the EMP Connector provided on GitHub.
Scenario:
Take the case of a subscriber listening on channel /topic/channel. The replayId is -1
Lets say the subscriber received messages upto replayId 20 and then due to some reason the subscriber went down and then came up and started listening on the channel again
In the time the subscriber was down four new events were published. But when the subscriber comes up it will start receiving messages from 25 since the replay id is -1
Question : Is there any way to ensure that the subscriber starts listening from id 21 when it comes up.
I know that one way is to give the replay id as 21. But that is not suitable for our application
Is there a way to query salesforce through cometD or any SOAP/REST API to check the last received event's replayID and then start the subscriber from that.
Can we use EventBusSubcriber for this? I started our application and subscribed to a platform event through cometd and tried querying the entries in EventBusSubcriber. But it did not have any entries
Scenario:
Take the case of a subscriber listening on channel /topic/channel. The replayId is -1
Lets say the subscriber received messages upto replayId 20 and then due to some reason the subscriber went down and then came up and started listening on the channel again
In the time the subscriber was down four new events were published. But when the subscriber comes up it will start receiving messages from 25 since the replay id is -1
Question : Is there any way to ensure that the subscriber starts listening from id 21 when it comes up.
I know that one way is to give the replay id as 21. But that is not suitable for our application
Is there a way to query salesforce through cometD or any SOAP/REST API to check the last received event's replayID and then start the subscriber from that.
Can we use EventBusSubcriber for this? I started our application and subscribed to a platform event through cometd and tried querying the entries in EventBusSubcriber. But it did not have any entries
There is not a way to query for platform events but even if you can, how can Salesforce know that your application/ a particular subscriber went down after ReplayID 20?