You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On reception of {"advice":{"interval":0,"reconnect":"handshake"},"channel":"/meta/connect","id":"5p","error":"403::Unknown client","successful":false} error from Salesforce.com, client calls _handleAdvice function https://github.com/faye/faye/blob/master/src/protocol/client.js#L353 and creates new client and new subscription on a topic with replayId.
My questions are
Why faye client is calling connect function on occurrence of "advice":{"interval":0,"reconnect":"handshake"} in _handleAdvice? Is it as per the design?
Why faye client is creating new subscription with older replayId. Please note here, we are using nforce npm package. Last processed event:
{"data":{"schema":"0c5uHJiCMwqzxeBHzibiag","payload":{"CreatedById":"0055g000004VXJnAAO","CreatedDate":"2022-03-24T15:34:18.123Z","abc__c":"amrt-run"},"event":{"replayId":4817372}},"channel":"/event/PlatformEvent__e"} Subscription after 403::Unknown client error:
{"channel":"/meta/subscribe","clientId":"6qnbw6zn8dabkws28tn7mawylg9","subscription":"/event/PlatformEvent__e","id":"2x","ext":{"replay":{"/event/MyPSL__e":4817264}}}
Can we override the _handleAdvice so that underlying faye client should not call it's in-built _handleAdvice but override function called in our code?
The text was updated successfully, but these errors were encountered:
The intended behaviour of the Faye client when receiving a "reconnect": "handshake" message like this is that it should forget its current clientId, and perform a fresh handshake to get a new clientId from the server. Once it has done that successfully, it re-registers any subscriptions to channels it was subscribed to before its previous session expired, so that you don't have to handle this reconnection failure yourself.
I am not able to answer questions about the Salesforce API. Overriding _handleAdvice() is not recommended as it is a private method, and changing its behaviour will probably break the client in some way.
Hi
On reception of
{"advice":{"interval":0,"reconnect":"handshake"},"channel":"/meta/connect","id":"5p","error":"403::Unknown client","successful":false}
error from Salesforce.com, client calls_handleAdvice
function https://github.com/faye/faye/blob/master/src/protocol/client.js#L353 and creates new client and new subscription on a topic with replayId.My questions are
connect
function on occurrence of"advice":{"interval":0,"reconnect":"handshake"}
in_handleAdvice
? Is it as per the design?nforce
npm package.Last processed event:
{"data":{"schema":"0c5uHJiCMwqzxeBHzibiag","payload":{"CreatedById":"0055g000004VXJnAAO","CreatedDate":"2022-03-24T15:34:18.123Z","abc__c":"amrt-run"},"event":{"replayId":4817372}},"channel":"/event/PlatformEvent__e"}
Subscription after 403::Unknown client error:
{"channel":"/meta/subscribe","clientId":"6qnbw6zn8dabkws28tn7mawylg9","subscription":"/event/PlatformEvent__e","id":"2x","ext":{"replay":{"/event/MyPSL__e":4817264}}}
_handleAdvice
so that underlying faye client should not call it's in-built_handleAdvice
but override function called in our code?The text was updated successfully, but these errors were encountered: