Channels
channel models the transport path messages flow through (for example Kafka, MQTT, SQS, or HTTP streams).
Example
This example defines a Kafka channel and shows a service sending an event through that channel.
channel OrdersChannel { version 1.0.0 name "Orders Channel" summary "Carries order events" protocol "Kafka" address "orders.events.v1" owner platform-team route AnalyticsChannel@1.0.0}
service OrdersService { version 1.0.0 sends event OrderCreated@1.0.0 to OrdersChannel@1.0.0}Properties
| Property | Type | Required | Description | Example |
|---|---|---|---|---|
version | semver | Yes | Resource version. | 1.0.0 |
name | string | No | Display name (defaults to id). | "Orders Channel" |
summary | string | No | Short description. | "Carries order events" |
owner | reference | No (repeatable) | Team/user owner reference. | owner platform-team |
protocol | string | No | Transport technology/protocol. | "Kafka" |
address | string | No | Broker/topic/queue address. | "orders.events.v1" |
route | reference | No (repeatable) | Route from one channel to another. | route AnalyticsChannel@1.0.0 |
parameter | block | No (repeatable) | Dynamic address parameter. | parameter sensorId { ... } |
draft | boolean | No | Marks resource as draft. | draft true |
deprecated | boolean | No | Marks resource as deprecated. | deprecated true |
Channel parameters
Use parameter to define dynamic segments in channel addresses:
channel sensor-data { version 1.0.0 address "sensors/{sensorId}/data" protocol "MQTT"
parameter sensorId { description "Unique sensor identifier" default "sensor-001" enum ["sensor-001", "sensor-042", "sensor-099"] examples ["sensor-001", "sensor-042"] }}Parameter properties
| Property | Type | Required | Description | Example |
|---|---|---|---|---|
description | string | No | What the parameter represents | "Unique sensor identifier" |
default | string | No | Default value | "sensor-001" |
enum | string[] | No | Allowed values | ["sensor-001", "sensor-042"] |
examples | string[] | No | Example values | ["sensor-001", "sensor-042"] |
Channel routing
Channels can route to other channels, modeling message pipelines:
channel Ingestion { version 1.0.0 protocol "Kafka" route Filtered route Archive}
channel Filtered { version 1.0.0 protocol "Kafka" route Analytics}Used by services
| Usage | Example |
|---|---|
| Send through a channel | sends event OrderCreated to OrdersChannel@1.0.0 |
| Receive from a channel | receives event PaymentProcessed from PaymentsChannel@1.0.0 |