ChuckJonas / ts-force

A Salesforce REST Client written in Typescript for Typescript
87 stars 21 forks source link

Streaming API : Platform events - replay from id #80

Open samjeffress opened 4 years ago

samjeffress commented 4 years ago

Hi,

Is it possible to use the Streaming API to subscribe to platform events, but from a certain replay id as outlined https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/using_streaming_api_durability.htm.

I'm building an occasionally connected api (AWS Lambda) that will store the last replayId and when it is triggered again will use the replayId to resume processing.

ChuckJonas commented 4 years ago

It should be possible, but unfortunately the documentation here is vague at best. Would need to dig into what the "Salesforce-provided CometD" setReplay code is actually doing.

Looks like that can be found here.