Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

replay functionality is not working - Platform events #178

@gorugontula

Description

@gorugontula

I am trying to subscribe to a platform event in salesforce and it works fine - except ability to replay events -either from a specific replayId or from the earliest available (-2). Below is the code that I am using - which is taken from a sample code provided in a salesforce doc but is not working - any help would be greatly appreciated.

`org.authenticate({ username: USERNAME, password: PASSWORD,securityToken: SECURITY_TOKEN }, function(err, oauth) {
if(err) return console.log("Error authenticating to Salesforce, " + err);
var client = org.createStreamClient();

	    REPLAY_ID = -2;
	    console.log("Latest REPLAY_ID - ", REPLAY_ID);			
	  }
	});
	
	
	var accs = client.subscribe({topic:TOPIC, isEvent:true, **retry: -2**});`

I have also tried using "replayId" and "replayFrom" instead of retry but still no good. I am running this code from AWS Lambda - Node JS .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions