Open dtto86 opened 2 years ago
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","abcc":"amrt-run"},"event":{"replayId":4817372}},"channel":"/event/PlatformEvente"} Subscription after 403::Unknown client error: {"channel":"/meta/subscribe","clientId":"6qnbw6zn8dabkws28tn7mawylg9","subscription":"/event/PlatformEvente","id":"2x","ext":{"replay":{"/event/MyPSLe":4817264}}}_handleAdvice
so that underlying faye client should not call it's in-built_handleAdvice
but override function called in our code?