Skip to main content

Module consumer

Module consumer 

Source
Expand description

Delivery mechanisms for Data: the Consumer / [AsyncConsumer] traits and the three built-in consumers ported from the Go SDK.

  • LogConsumer writes NDJSON log files consumed later by LogBus. In async mode it runs a streaming writer task fed by an MPSC channel.
  • BatchConsumer buffers events and uploads them over HTTPS (gzip compression, three retry attempts, a failure cache, optional auto flush).
  • DebugConsumer validates each event against the receiver, one by one.

§Choosing an API style



Structs§

BatchConsumer
Buffer events and upload them in batches to the ThinkingData receiver over HTTPS.
BatchConsumerConfig
Configuration for BatchConsumer, mirroring the Go SDK’s TDBatchConfig.
DebugConsumer
Validate data against the ThinkingData receiver, one event per request.
LogConsumer
Write data to local log files, one JSON object per line, for later ingestion with LogBus or another transfer tool.
LogConsumerConfig
Configuration for LogConsumer, mirroring the Go SDK’s TDLogConsumerConfig.

Enums§

RotateMode
How often the log file rotates by time.

Constants§

DEFAULT_BATCH_SIZE
Event count threshold for triggering a flush.
DEFAULT_CACHE_CAPACITY
Maximum number of cached (undelivered) batches.
DEFAULT_INTERVAL_SECS
Auto flush spacing in seconds.
DEFAULT_TIMEOUT_MS
Request deadline in milliseconds.
MAX_BATCH_SIZE
Hard upper bound for the batch size.

Traits§

Consumer
Synchronous delivery interface implemented by all consumers.