Constructor for a durable streaming replay extension

Modified from original Salesforce demo source code: https://github.com/developerforce/SalesforceDurableStreamingDemo/blob/3d4a56eac956f744ad6c22e6a8141b6feb57abb9/staticresources/cometdReplayExtension.resource

Example usage:

const jsforce = require('jsforce');
const { StreamingExtension } = require('jsforce/api/streaming');

const conn = new jsforce.Connection({ … });

const channel = "/event/My_Event__e";
const replayId = -2; // -2 is all retained events

const replayExt = new StreamingExtension.Replay(channel, replayId);

const fayeClient = conn.streaming.createClient([ replayExt ]);

const subscription = fayeClient.subscribe(channel, data => {
console.log('topic received data', data);
});

subscription.cancel();

Constructors

Properties

_channel: string
_extensionEnabled: boolean
_replay: undefined | null | number

Methods