BatchDeliveryType
Batching delivery. The first message opens a window of
interval
milliseconds; when it closes, every
message collected in it is delivered at once as an array, in arrival order. Nothing is dropped.
Best for event-like data (trades, chat messages, logs) where every message must be processed.
Import
import { BatchDeliveryType } from "@hyper-fetch/sockets"
Source
Package
Preview
type BatchDeliveryType = {
interval: number;
maxSize?: number;
strategy: batch;
}
Structure
BatchDeliveryType
| Name | Type | Description |
|---|---|---|
| interval | | Window length in milliseconds, measured from the first message of a batch. |
| maxSize | | Deliver early as soon as this many messages were collected. Defaults to no limit. |
| strategy | |
