-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silently fails when replay id is too old. #20
Comments
Package Version : 3.0.0 |
hi What I did to handle this is to catch this exception in ResilientStreamingClient.cs and reset the ReplayId to -1, something like the below. So basically as soon as the client gets this error (basically there has been no events in Salesforce for ~72h), it would reconnect with -1 (register for new events).
|
Is this fix available in 3.0.1? |
@apaulro , do I have to override the existing method? I'm using the nuget package. |
Hi @kvansaders |
@kvansaders and @apaulro please get the latest and use the override to get the job done. In addition, I added di extensions methods to support inherited class. enjoy! |
I created a listener that grabs the latest received replayId from a separate table and reconnects using that particular replayId for continuity. The listener stayed alive for 2 days with no errors, but must of had a stale connection of sorts, as new messages stopped coming in. After realizing that the messages were being missed, I checked the PushTopic on Workbench and entered the latest replayId the listener was trying.
Workbench Error:
7. Subscription Failure: 400::The replayId {82} you provided was invalid. Please provide a valid ID, -2 to replay all events, or -1 to replay only new events.
"error": "400::The replayId {82} you provided was invalid. Please provide a valid ID, -2 to replay all events, or -1 to replay only new events.",
"successful": false
The CometD client knew nothing of this error and just pretended that the connection was all fine and dandy. As a workaround for now, I am now restarting my listener every hour to make sure that the connection is fresh.
It would make sense to me that if this error actually was received and an exception thrown, I could handle it with a new connection asking for -2 and doing a reconciliation of duplicates as they come in.
The text was updated successfully, but these errors were encountered: