File tree Expand file tree Collapse file tree 1 file changed +0
-20
lines changed
Expand file tree Collapse file tree 1 file changed +0
-20
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ See the [official Pub/Sub API repo](https://github.com/developerforce/pub-sub-ap
1212- [ Basic Example] ( #basic-example )
1313- [ Other Examples] ( #other-examples )
1414 - [ Publish a platform event] ( #publish-a-platform-event )
15- - [ Subscribe to an infinite number of events] ( #subscribe-to-an-infinite-number-of-events )
1615 - [ Subscribe with a replay ID] ( #subscribe-with-a-replay-id )
1716 - [ Subscribe to past events in retention window] ( #subscribe-to-past-events-in-retention-window )
1817 - [ Handle gRPC stream lifecycle events] ( #handle-grpc-stream-lifecycle-events )
@@ -265,25 +264,6 @@ const publishResult = await client.publish('/event/Sample__e', payload);
265264console.log('Published event: ', JSON.stringify(publishResult));
266265` ` `
267266
268- ### Subscribe to an infinite number of events
269-
270- You may subscribe to an infinite number of events by reconnecting the client automatically when the last requested event is received.
271-
272- ` ` ` js
273- // Handle last requested event
274- subscription.on('lastevent', async () => {
275- try {
276- // Re-subscribe to more events
277- subscription = await client.subscribe(
278- subscription.getTopicName(),
279- NUMBER_OF_EVENTS
280- );
281- } catch (error) {
282- console.log(error);
283- }
284- });
285- ` ` `
286-
287267### Subscribe with a replay ID
288268
289269Subscribe to 5 account change events starting from a replay ID :
You can’t perform that action at this time.
0 commit comments