You can use Apex triggers to subscribe to change events. Or you can use a Bayeux client to subscribe to Streaming API on the publication channel.
I looked at an example code that subscribes to Change Events Using an Apex Trigger and I did not find any replay Id there. Same with Bayeux client. I recommend looking at the following resources to learn more
I looked at an example code that subscribes to Change Events Using an Apex Trigger and I did not find any replay Id there. Same with Bayeux client. I recommend looking at the following resources to learn more
https://trailhead.salesforce.com/en/content/learn/modules/change-data-capture/subscribe-to-change-events-using-an-apex-trigger
https://www.jitendrazaa.com/blog/others/tips/streaming-api-using-jquery-salesforce/
Let me know if this helps, if it does, please close the query by marking it as solved. It may help others in the community. Thank You!