Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Gateway GClasses

Message routing, multiplexing, and persistent queuing.

Source: kernel/c/root-linux/src/c_channel.c, c_iogate.c, c_qiogate.c, c_mqiogate.c


C_CHANNEL

Base communication channel — wraps a transport + protocol stack into a single open/closed abstraction with message-rate statistics.

PropertyValue
StatesST_STOPPED, ST_CLOSED, ST_OPENED
Input eventsEV_ON_MESSAGE, EV_SEND_MESSAGE, EV_ON_OPEN, EV_ON_CLOSE, EV_DROP
Output eventsEV_ON_MESSAGE, EV_ON_OPEN, EV_ON_CLOSE

Key attributes

AttributeTypeDescription
openedboolChannel state (read-only).
subscriberpointerGobj receiving output events.
txMsgsec / rxMsgsecintegerCurrent message rate per second (stats).
maxtxMsgsec / maxrxMsgsecintegerPeak message rates (stats).

C_IOGATE

I/O gate — routes messages between channels and upper-layer destinations. Supports one-at-a-time (rotated) or broadcast delivery.

PropertyValue
StatesST_STOPPED, ST_IDLE
Input eventsEV_ON_MESSAGE, EV_SEND_MESSAGE, EV_ON_OPEN, EV_ON_CLOSE, EV_DROP, EV_STOPPED
Output eventsEV_ON_MESSAGE, EV_ON_OPEN, EV_ON_CLOSE

Key attributes

AttributeTypeDescription
persistent_channelsboolKeep channels alive across reconnections.
send_typeinteger0 = rotated one-at-a-time, 1 = broadcast to all.

Commands

CommandDescription
view-channelsList managed channels and their state.
enable-channel / disable-channelEnable or disable a channel.
trace-on-channel / trace-off-channelToggle tracing on a channel.
reset-stats-channelReset channel statistics.

C_QIOGATE

Queued I/O gate — extends C_IOGATE with persistent message queuing backed by timeranger. Provides ack-based delivery with automatic retry.

PropertyValue
StatesST_STOPPED, ST_IDLE
Input eventssame as C_IOGATE + EV_TIMEOUT
Output eventssame as C_IOGATE

Key attributes

AttributeTypeDescription
tranger_pathstringPath for the timeranger queue storage.
tranger_databasestringDatabase name.
topic_namestringQueue topic name.
max_pending_acksintegerMaximum messages in flight without ack.
timeout_ackintegerAck timeout in seconds.
timeout_pollintegerQueue poll interval in seconds.
backup_queue_sizeintegerBackup retention size.
alert_queue_sizeintegerQueue size threshold for alerts.

Commands

CommandDescription
queue_mark_pendingMark a queued message as pending.
queue_mark_notpendingMark a queued message as not pending.

C_MQIOGATE

Multiple-queue I/O gate — distributes messages to child C_QIOGATE instances based on key hashing.

PropertyValue
StatesST_STOPPED, ST_IDLE
Input eventssame as C_IOGATE
Output eventssame as C_IOGATE

Key attributes

AttributeTypeDescription
methodstringRouting method.
digitsintegerHash digits for distribution.
keystringJSON field name used as routing key.

Commands

CommandDescription
view-channelsList child queue gates and their state.