A representation of key metrics relating to the origin and age of a message.

struct roq::MessageInfo

Trace information relating to the current message.

Public Members

uint8_t source = {}

Source identifier (index into the list of connections)

std::string_view source_name

Source name.

UUID source_session_id

Session identifier (UUID)

uint64_t source_seqno = {}

Sequence number (strictly increasing)

std::chrono::nanoseconds receive_time_utc = {}

Client receive time (realtime clock)

std::chrono::nanoseconds receive_time = {}

Client receive time (monotonic clock)

std::chrono::nanoseconds source_send_time = {}

Source send time (monotonic clock)

std::chrono::nanoseconds source_receive_time = {}

Source receive time (monotonic clock)

std::chrono::nanoseconds origin_create_time = {}

Origin create time (monotonic clock)

std::chrono::nanoseconds origin_create_time_utc = {}

Origin create time (realtime clock)

bool is_last = false

Is last in batch?

uint64_t opaque = {}

Opaque value (internal)


A template used to encapsulate a message with its associated roq::MessageInfo.

template<typename T>
struct roq::Event


Public Functions

template<typename R, typename H, typename ...Args>
inline R dispatch(H &&handler, Args&&... args)

Dispatch to handler.

inline operator const MessageInfo&() const

Access MessageInfo.

inline operator const T&() const

Access Message.

inline operator std::tuple<const MessageInfo&, const T&>() const

Structured binding.

Public Members

const MessageInfo &message_info


const T &value