Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion docs/api/reading-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,4 +385,17 @@ publisher.subscribe(new Subscriber<ReadMessage>() {

latch.await();
```
:::
:::

## Configuring Backpressure

The client allows you to configure backpressure to control how many events are buffered on the client side before requesting more from the server.

| Option | Description | Default Value |
|----------------|-----------------------------------------------------------------------------|---------------|
| batchSize | The maximum number of events the client will request from the server in a single batch. | 512 |
| thresholdRatio | The fraction of the `batchSize` at which the client will send a new request for more events. | 0.25 |

By default, the client requests up to 512 events at a time. It will automatically
request more events when the number of buffered (unprocessed) events falls below
25% of the batch size.
13 changes: 13 additions & 0 deletions docs/api/subscriptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -406,3 +406,16 @@ For example:
- If `n` = 2, the notification is sent every 64 events.
- If `n` = 3, it is sent every 96 events, and so on.
:::

## Configuring Backpressure

The client allows you to configure backpressure to control how many events are buffered on the client side before requesting more from the server.

| Option | Description | Default Value |
|----------------|-----------------------------------------------------------------------------|---------------|
| batchSize | The maximum number of events the client will request from the server in a single batch. | 512 |
| thresholdRatio | The fraction of the `batchSize` at which the client will send a new request for more events. | 0.25 |

By default, the client requests up to 512 events at a time. It will automatically
request more events when the number of buffered (unprocessed) events falls below
25% of the batch size.
Loading