ORE Studio 0.0.4
Loading...
Searching...
No Matches
Public Attributes | List of all members
nats_stream_sample Struct Referencefinal

A single point-in-time sample of a JetStream stream's metrics. More...

#include <nats_stream_sample.hpp>

Collaboration diagram for nats_stream_sample:
Collaboration graph

Public Attributes

std::chrono::system_clock::time_point sampled_at
 When this sample was taken.
 
std::string stream_name
 JetStream stream name (e.g. "ORES_TRADES").
 
std::uint64_t messages {0}
 Number of messages currently stored in the stream.
 
std::uint64_t bytes {0}
 Total bytes currently stored in the stream.
 
int consumer_count {0}
 Number of active consumers on this stream.
 

Detailed Description

A single point-in-time sample of a JetStream stream's metrics.

Populated by polling the NATS server's HTTP monitoring endpoint at /jsz?streams=true. One row per stream per poll is written to ores_nats_stream_samples_tbl.

Member Data Documentation

◆ sampled_at

std::chrono::system_clock::time_point sampled_at

When this sample was taken.

Part of the composite partitioning key for the TimescaleDB hypertable.

◆ stream_name

std::string stream_name

JetStream stream name (e.g. "ORES_TRADES").

Part of the composite primary key.

◆ consumer_count

int consumer_count {0}

Number of active consumers on this stream.

A value of zero means no subscriber is reading from the stream.