Skip to content

trackkit / dispatcher/types / BatchingOptions

Interface: BatchingOptions

Defined in: dispatcher/types.ts:91

Controls how individual provider HTTP requests are grouped into batches.

Batching happens inside the network dispatcher and is independent of the facade-level queue. It reduces network overhead by co-ordinating sends, but never changes the semantic ordering of events within a batch.

All fields are optional except enabled. Unset fields fall back to library defaults.

Properties

enabled?

optional enabled: boolean

Defined in: dispatcher/types.ts:93

Enable event batching to reduce network requests.


maxSize?

optional maxSize: number

Defined in: dispatcher/types.ts:100

Maximum number of events per batch.

When reached, the batch is flushed even if maxWait has not elapsed.


maxWait?

optional maxWait: number

Defined in: dispatcher/types.ts:105

Maximum time in milliseconds to wait before sending an incomplete batch.


maxBytes?

optional maxBytes: number

Defined in: dispatcher/types.ts:112

Maximum payload size in bytes per batch.

Useful for staying under gateway/proxy limits.


concurrency?

optional concurrency: number

Defined in: dispatcher/types.ts:117

Number of batches that can be in-flight simultaneously.


deduplication?

optional deduplication: boolean

Defined in: dispatcher/types.ts:124

Remove duplicate events within the same batch.

Deduplication is based on dispatcher-level heuristics.

Released under the MIT License.