Skip to content

Commit

Permalink
doc: roll back last change
Browse files Browse the repository at this point in the history
  • Loading branch information
pozil committed Dec 20, 2023
1 parent d4af346 commit c6919fe
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ See the [official Pub/Sub API repo](https://github.com/developerforce/pub-sub-ap
- [Basic Example](#basic-example)
- [Other Examples](#other-examples)
- [Publish a platform event](#publish-a-platform-event)
- [Subscribe to an infinite number of events](#subscribe-to-an-infinite-number-of-events)
- [Subscribe with a replay ID](#subscribe-with-a-replay-id)
- [Subscribe to past events in retention window](#subscribe-to-past-events-in-retention-window)
- [Handle gRPC stream lifecycle events](#handle-grpc-stream-lifecycle-events)
Expand Down Expand Up @@ -265,25 +264,6 @@ const publishResult = await client.publish('/event/Sample__e', payload);
console.log('Published event: ', JSON.stringify(publishResult));
```

### Subscribe to an infinite number of events

You may subscribe to an infinite number of events by reconnecting the client automatically when the last requested event is received.

```js
// Handle last requested event
subscription.on('lastevent', async () => {
try {
// Re-subscribe to more events
subscription = await client.subscribe(
subscription.getTopicName(),
NUMBER_OF_EVENTS
);
} catch (error) {
console.log(error);
}
});
```

### Subscribe with a replay ID

Subscribe to 5 account change events starting from a replay ID:
Expand Down

0 comments on commit c6919fe

Please sign in to comment.