Integration
Say how systems reach each other and what travels between them.
Brokers and channels
Use a broker whenever two components talk asynchronously, but over email, snmp, web-socket or signal-r, which reach the other side through its interface. Neither side knows the other: both know only the channel. One channel serves every party that names it, so publish-subscribe has one topic, not one per pair.
A storage account's Azure Storage Queues are a broker of kind azure.storage-queue, declared inside its storage account, whose channels are Queues, as with azure.service-bus.queues. An RPA product's work queues, through which robots hand work to each other, are a broker of kind rpa.queues, whose channels are Queues too.
A change feed is a channel too, kind Stream, on an azure.event-hubs broker or another that carries streams.
An e-mail system can be either. Usually it is a system you reach over email, landing on its mail-api. Where its mailboxes matter, make it a broker of kind email, whose channels are Mailboxes.
A file handed from one system to another is a channel on the file or blob storage the files are in, of kind file-share, blob-storage or sftp, never on a broker. File handoff is usually a poor integration choice, but it is real and Kanoniq models it. Data at rest in a directory is the file storage itself: whether a directory is a conduit, a store or both is your call, and the statements you write say which.
A broker's kind is a generic kind or a provider's product word: kafka, rabbitmq, mqtt, or aws.sqs, gcp.pub-sub. Where a kind carries one kind of channel, its channels take it; where it carries several, as rabbitmq carries queues and topics, each channel states its own. A broker is a platform service, run by its provider or on a host of your own, like the rest of the infrastructure.
Events, commands and queries
A channel says where messages go, not what they are. Say what they are with three kinds of message, each about one domain object:
| Message | Says | Declared in | Travels |
|---|---|---|---|
| Event | What happened: Order placed | The component that publishes it | Into and out of channels |
| Command | Do something: Send invoice | The component that handles it | On any connection to its handler |
| Query | Answer something: Invoice status | The component that handles it | The same |
Whoever owns the contract declares it: a publisher its events, which any number of subscribers depend on, a handler its commands and queries, which every sender depends on. A message may state its format, json, xml, avro or protobuf, and link to its real schema. Only breaking versions are modeled, v1, v2, so you can see who still consumes v1. A connection names what it carries.
An event is an integration event where a delivery takes it to a component in another bounded context, or in none. Kanoniq reads that from the contexts; nothing marks it. Events raised and handled inside one component's code are not modeled.
Messages are not drawn in a view yet.
Scenarios
A scenario is an ordered walk over connections already in the model, for one piece of behavior such as signing in: which system asks or tells which, first to last. It sits directly in its ecosystem. Each step names one connection by its ends, or one hop through a channel from a publisher to a subscriber, and may name the message it sends and a sentence saying what it does. A step is no element of its own, so one connection may be stepped on twice. A scenario may name the process task it carries out. It holds no conditions, loops or timings, and no replies: a failure path is a scenario of its own. No view of the landscape draws a scenario. See Writing a scenario.
Broker and channel
A broker is declared in an ecosystem, a platform or a monolith, or inside the storage-account or the redis db-server it is part of. It is a platform service: after its kind comes how it runs, paas or on <host or app-platform>, then in <network> and public, as for the rest of the infrastructure, and its stages are its environment lines. in-transit encrypted or in-transit plaintext follows its placement, as on an API (Interface): broker events "Events" : rabbitmq on mq-host in-transit plaintext. Most providers' product words take no plaintext, so a broker of one reads as encrypted with nothing stated, and stating it plaintext is KQ269. Its kind is a generic kind or a provider's product word, one the build doesn't know being KB079. Its kind decides the kind of its channels:
| Broker kind | Drawn as | Channels are |
|---|---|---|
kafka | Topics | |
rabbitmq | Queues or Topics, each stating its kind | |
activemq | Queues or Topics, each stating its kind | |
mqtt | Topics | |
redis-pub-sub | Topics | |
redis-streams | Streams | |
email | Mailbox | |
sms | Sms | |
push | Push | |
rpa.queues | Queues | |
azure.service-bus.queues | Queues | |
azure.service-bus.topics | Topics | |
azure.event-hubs | Streams | |
azure.event-grid | Topics | |
azure.event-grid.mqtt | Topics | |
azure.storage-queue | Queues | |
azure.signal-r | Topics | |
azure.web-pub-sub | Topics | |
azure.communication-services.email | Mailbox | |
azure.communication-services.sms | Sms | |
azure.notification-hubs | Push | |
aws.sqs | Queues | |
aws.sns | Topics | |
aws.event-bridge | Topics | |
aws.kinesis | Streams | |
aws.msk | Topics | |
aws.mq.rabbitmq | Queues or Topics, each stating its kind | |
aws.mq.activemq | Queues or Topics, each stating its kind | |
aws.app-sync.events | Topics | |
aws.iot-core | Topics | |
aws.ses | Mailbox | |
aws.end-user-messaging | Sms or Push, each stating its kind | |
gcp.pub-sub | Topics | |
gcp.eventarc | Topics | |
gcp.cloud-tasks | Queues | |
gcp.managed-kafka | Topics | |
gcp.firebase-cloud-messaging | Push |
Where a kind carries several, each channel states its own after its name, : queue or : topic; where it carries one, a channel states none, and either slip is KB079. redis-pub-sub and redis-streams are declared inside a redis database server, and azure.storage-queue inside its storage account:
A file handoff is a channel on a storage, declared in the block of the file or blob storage the files are in, with its kind: file-share on a file one, blob-storage on a blob one, sftp on either. Nothing creates one, since its kind would be a guess:
A channel in a broker whose kind carries one kind of channel usually needs no declaration either: over events/orders creates it. Declare it to give it a name or a description, or to mark it open-host and published-language as an API is: channel orders "Orders" open-host published-language.
Writing events, commands and queries
An event says what happened, and is declared in the component that publishes it. A command asks one component to do something, and a query asks it for something; both are declared in the component that handles them. A monolith with no components of its own declares its own.
about is required and names the domain object the message is about, looked up as a data entity's is: bare where the object is declared in the component's own platform, by its path elsewhere. Anything but a domain object is an error (KQ200, KQ203).
format is optional: json, xml, avro or protobuf. Leave it out and nothing is said about the format. schema is optional too, after format: a link to the real schema, such as an AsyncAPI document, or a schema registry subject as the registry names it. Kanoniq shows it and doesn't read it.
A block lists the breaking versions, v1, v2, one per line. A compatible change, such as an added optional field, needs no new version. A message with no block has no versions. A later plateau adds a version with its line and retires one with -v1 (see Change over time).
A message is drawn in no view yet.
Connections
| Form | Means |
|---|---|
a -> b/api over http | a calls the interface api of b. http lands on an http-api, grpc on a grpc-api, graphql on a graphql-api, web-socket on a web-socket-api, signal-r on a signal-r-hub, ipc on an ipc-api, email on a mail-api, snmp on an snmp-api, ldap on an ldap-api; the interface is created if it isn't declared |
a -> b/api over http/json | The same, saying what the payload is written in: json or xml, for http only. Leave it out and nothing is said about the format |
a -> b over in-process | A call inside one monolith: it lands on the component b itself, with no interface. Both ends are components of the same monolith, in any of its modules |
r -> app/desktop over ui | A robot or a role uses a user interface's screens. The user interface must be declared |
a -> b over events/orders | a publishes to the channel orders of the broker events, and b receives from it. The channel is created if it isn't declared |
a -> events/orders or events/orders -> b | One side only, for a party outside the model |
A connection always names its target. a -> b with b a component is an error, unless it goes over in-process: say which interface, or which channel.
A call names the version of the API it calls after its target, web-shop -> order-service/orders-api v2 over http/json, one version at most. Name a version the API declares, and none where it declares none (KQ249).
via <gateway> after the transport names the gateway a call goes through, and comes before auth, whose own via names an identity provider: the first via after over is the gateway, the one after a scheme the identity provider.
The gateway publishes the API the call lands on (KQ252), or is the nat gateway an outbound call leaves by. Only a call over a protocol takes one: a leg goes through its channel's broker, and via on a leg, a ui statement or a - line is KB078. Leave it out and no gateway is said; never write a call through a gateway as two calls.
email reads by its position. After over it is the protocol, after a broker's : the broker kind. Unlike http and grpc it is asynchronous, but the mail system stays a system you call; make it a broker only where its mailboxes matter. A protocol after over goes only with an interface, and a channel only without one.
snmp is asynchronous too, for alerts sent to a monitoring system, which stays a system you call rather than a broker. ldap is synchronous: how a component authenticates against and looks up a directory such as Active Directory. Neither takes a payload format.
graphql is synchronous: a query is sent and waited on. web-socket and signal-r are asynchronous: once the client opens the connection, both sides send without waiting for a reply, and the arrow goes from the client that opens it. Like email and snmp, each is a direct connection with no broker between. signal-r is ASP.NET's real-time library, whose clients connect to a hub. None of the three takes a payload format; json and xml are for http only.
ipc is a call to another process on the same machine through a pipe, standard input and output, a Unix domain socket, a named pipe or Node IPC, such as an editor extension talking to the language server it starts. It is synchronous, and the arrow goes from the process that starts or opens the channel. What is spoken over it isn't told apart, so name it in a doc comment (/// The Language Server Protocol.). A socket on localhost is not ipc: use what is spoken over it, http or grpc. It takes no payload format and no auth.
ui is how a robot or a person uses a screen, the one way to land on a user interface. Only a robot or a role writes it (KQ083), and it names a declared spa, mobile-app or desktop-app (KQ084). It takes no payload format, no auth and no grant: who signs in is the role's in, or the robot's runs-as.
A role with no ui uses every user interface of its application; once it has one, it uses only the ones it names, so clerk above uses the desktop client and not the admin console. A role's ui stays in its own application (KQ085): to use another application's screens, people hold a role there. A robot's ui into an application where the identity it runs-as holds no role is KQ111.
Several senders and receivers on one channel all share it, and each pair of ends is one connection. a -> b over events/orders and a -> c over events/orders are one send from a into the channel and two deliveries out of it. The model holds the sends and the deliveries, not who talks to whom: that is what a channel decouples. Your file keeps the statements as you wrote them.
What a connection carries
carries, after every other part of a connection, names the events, commands and queries it carries:
A Code alone names a message of the end that owns it. On a connection into a channel, and in a -> b over events/orders, that is the sender's own event. On a delivery out of a channel, a call or an in-process call, it is a command or a query of the component reached. Name any other by its path: an event on a delivery by its publisher's path, a command on a connection into a channel by its handler's.
An event travels only into or out of a channel, and an event on a call is an error (KB070). A connection into a channel carries only the sender's own events (KQ098), and a delivery only what a connection into its channel carries (KQ097). A command or a query travels to its handler, on a call, a channel or in-process (KQ201).
Name a versioned message with its version, order-placed v1, once for each version carried, and one without versions bare (KQ099, KQ202). a -> b over events/orders carries ... says it for both connections.
carries is optional: leave it out and nothing is said about what a connection carries. Don't start the next statement with a Code spelled like a version, such as a component coded v2; the list would read it as a version.
What a sync carries
carries also ends a sync, after its scheme, and names the events, commands and queries that keep the copy, or one mechanism when no message does:
Name a message as from names its component: by its path, crm/customer-changed, or by its Code alone when the component holding the replica declares it, as it does a command it handles. Name a versioned message with its version, as on a connection.
What it carries says who starts it. An event is its source's, which publishes it (KQ214); a command is the replica holder's, which the source calls (KQ215); a query is the source's, which the holder calls to pull the copy (KQ216). A query goes over a protocol, never through a channel (KQ217), and a pulled sync's auth is the holder's. Over a channel, the list stands on both of the sync's connections. A message about another domain object than the entity's is a lint (KQ118).
A mechanism names how the copy is kept with no message: cdc (change data capture), etl (a scheduled extract, transform and load job), file (an export dropped and picked up) or replication (a database product's own copy between two components' databases). A sync carries messages or one mechanism, never both (KQ218). The four are reserved words.
An entity may have several syncs. Write the first on the entity's line and each other on its own line under it. All but one are marked reconcile, which ends the line: the unmarked one is the main feed, and each reconcile sync corrects drift in the copy it keeps (KQ219). Two syncs with the same source, route and carries are an error (KQ220).
Syncs from different components into one entity are allowed; the recommended policy one-source-per-replica reports them (Governance).
carries is optional on a sync too: leave it out and nothing is said about what moves or who starts it.
Writing a scenario
A scenario walks over connections you already declared, in order, for one piece of behavior: which system asks or tells which, first to last.
scenario <code> "<name>"goes directly in an ecosystem, nowhere else: the one its first step starts in (KQ244).for <process>/<task>, optional, names the task of a business process it carries out (KQ245), and the first step then starts at the task's screen or one of its systems (KQ243). Its block holds its steps, at least one, in order.step <source> -> <target>names a connection by its two ends, as it is declared:a -> b/apifor a call,a -> bfor anin-processcall.step <source> -> <channel> -> <target>is one hop through a channel, from the publisher to a subscriber. A step never creates an interface; it may name one a connection created. The connection must exist (KQ240), and each step starts where the scenario starts or where an earlier step arrived (KQ241).carries <message>, optional, names the event, command or query the step sends, with its version,carries order-placed v2; its connection, or both legs of a hop, must carry it (KQ242). A code alone is a message of the component the call reaches, or of the publisher on a hop; any other is named by its path.- A sentence, optional and last, says what the step does. A reply is never written: a synchronous call's answer is the call's, and the sentence may say both ways.
- A scenario is written whole. To change its steps at a later plateau, declare it again in that plateau's block;
-<code>removes it. A step whose connection is gone at a plateau is an error in that plateau.kq arrangeputs an ecosystem's scenarios inscenarios.kq.
Reference
The element types, relationships and kinds of this area, each with what it means.
Element types
| Element type | What it is |
|---|---|
| Channel | A Channel is what messaging parties attach to when neither knows the other, such as a topic or a queue: the messaging counterpart to an Interface. A Channel sits in its Broker, or for a file handoff on the file or blob Storage the files are in, and serves every party that names it. |
| Broker | A Broker is the infrastructure messaging goes through, such as a Kafka cluster or a Service Bus namespace. A Broker contains Channels, and its kind names its technology; it runs on the provider or on what the organization runs. |
| Event | An Event is a message saying what happened, declared by the Component that publishes it, such as Order placed. An Event is about one Domain Object and is carried on legs into and out of Channels. |
| Command | A Command is a message asking one handler to do something, declared by the Component that handles it, such as Send invoice. A Command is about one Domain Object and is carried on any Connection reaching its handler. |
| Query | A Query is a message asking one handler for something, declared by the Component that handles it, such as Invoice status. A Query is about one Domain Object and is carried on any Connection reaching its handler. |
| Scenario | A Scenario is an ordered walk over existing connections for one piece of behavior, such as signing in: which system asks or tells which, in what order. It sits directly in an Ecosystem, and may be anchored on the task of a Process it carries out. |
Relationships
| Relationship | What it says |
|---|---|
| Connection | A Connection records control flow, from the end in the active position: a call from a Component to an Interface, an in-process call between two Components of one Monolith, or a leg into or out of a Channel. |
| Sync | A Sync replicates one holding of a Domain Object into another, across Components, over a protocol or through a Broker's Channel, and may say what keeps the copy. |
Channel kind: A Channel's kind: how the Channel delivers what is sent through it, never the product. In a Broker whose kind carries one Channel kind it is that one; in a Broker whose kind carries several, and on a Storage, the Channel states it.
| Value | Means |
|---|---|
topic | A topic: every subscriber receives each message. |
queue | A queue: each message goes to one receiver. |
stream | A stream: an ordered sequence of events that readers consume at their own pace, such as a change feed. |
mailbox | A mailbox whose messages matter to the landscape: on an email Broker that sends, the sender address. |
sms | Text messages sent to people's phones, from one sender; the recipients are people, not modeled. |
push | Notifications pushed to a mobile app on people's devices; the recipients are people, not modeled. |
file-share | A file handoff through a file share: files passed between parties in a directory of a file Storage. |
blob-storage | A file handoff through blob storage: files passed between parties in a blob Storage's container. |
sftp | A file handoff over SFTP: files passed between parties on a file or blob Storage an SFTP endpoint serves. |
Auth scheme: How the source of a call, a leg or a sync authenticates, named by mechanism, never by product. A token scheme is issued by an Identity Provider.
| Value | Means |
|---|---|
none | Nobody is checked: a public endpoint, an open relay or an anonymous bind. |
key | A static shared secret the caller stores: a password, an API or subscription key, a SAS token, a connection string, an HMAC-signed webhook or an SNMP community string. |
certificate | A key pair the caller holds: a client certificate (mTLS), an SSH key or SASL EXTERNAL. |
client-credentials | An application's own OAuth 2.0 or OpenID Connect token, or a signed client assertion. |
workload-identity | A token the platform the caller runs on obtains for it, with no secret in the caller's configuration. |
user-token | The signed-in user's identity, carried on unchanged: a bearer token, or a session cookie from a user-facing Interface to its backend. |
on-behalf-of | A token the caller obtains for itself, for the target, by exchanging the user's token and its own credential; the token carries the user's identity. |
kerberos | Windows integrated authentication: Kerberos, NTLM, Negotiate or SASL GSSAPI. |
Protocol: The protocol a call or a sync travels over. Each protocol but in-process implies the kind of Interface the call lands on.
| Value | Means |
|---|---|
http | HTTP, synchronous. A call over http lands on an HttpApi Interface. |
grpc | gRPC, synchronous. A call over grpc lands on a GrpcApi Interface. |
email | Email, asynchronous. A call over email lands on the mail system's MailApi Interface. |
snmp | SNMP, asynchronous: a trap is sent and not answered. A call over snmp lands on an SnmpApi Interface. |
ldap | LDAP, the directory protocol, synchronous. A call over ldap lands on an LdapApi Interface. |
graphql | GraphQL, synchronous: a query a client sends over HTTP and waits on. A call over graphql lands on a GraphqlApi Interface. |
web-socket | WebSocket, asynchronous: once the client opens the connection, both sides send without waiting for a reply. A call over web-socket lands on a WebSocketApi Interface. |
signal-r | SignalR, ASP.NET's real-time library, asynchronous. A call over signal-r lands on a SignalRHub Interface. |
ipc | A call between two processes on one machine through a local channel, synchronous: a pipe, standard input and output, a Unix domain socket, a named pipe or Node IPC, whatever is spoken over it. A call over ipc lands on an IpcApi Interface. It carries no payload format and no authentication. |
in-process | A call between two Components of one Monolith, which lands on the Component itself, with no Interface and no authentication. |
ui | Use through a user interface, as a person works a screen: made only by a Robot or a Role, it lands on any declared user-facing Interface and creates none. It carries no payload format and no authentication. |
Payload format: The format a payload is written in: on a call or a sync over a protocol that takes it, or on an event, a command or a query.
| Value | Means |
|---|---|
json | JSON. A call or a sync takes it over http only. |
xml | XML. A call or a sync takes it over http only. |
avro | Apache Avro, a binary format with a schema. Only an event, a command or a query states it. |
protobuf | Protocol Buffers, a binary format with a schema. Only an event, a command or a query states it. |
Broker kind: A Broker's kind, as written: a generic kind or a provider's product word. The kind fixes the kinds of Channel the Broker contains.
| Value | Means |
|---|---|
kafka | Apache Kafka. Each Channel in a kafka Broker is a Topic. |
rabbitmq | RabbitMQ. Each Channel in a rabbitmq Broker states its kind, a Queue or a Topic. |
activemq | Apache ActiveMQ. Each Channel in an activemq Broker states its kind, a Queue or a Topic. |
mqtt | An MQTT broker, pushing in real time to the clients subscribed. Each Channel in an mqtt Broker is a Topic. |
redis-pub-sub | Redis Pub/Sub, inside a redis database server, fire and forget. Each Channel in a redis-pub-sub Broker is a Topic. |
redis-streams | Redis Streams, inside a redis database server, kept for consumer groups. Each Channel in a redis-streams Broker is a Stream. |
email | A mail server whose mailboxes matter. Each Channel in an email Broker is a Mailbox. |
sms | A service sending text messages to people. Each Channel in an sms Broker is an Sms sender. |
push | A service pushing notifications to mobile apps. Each Channel in a push Broker is a Push. |
rpa.queues | An RPA product's work queues, through which robots hand work to each other. Each Channel in an rpa.queues Broker is a Queue. A robot authenticates to its own product's queues on no arrow. |
azure.service-bus.queues | Azure Service Bus queues. Each Channel in an azure.service-bus.queues Broker is a Queue. |
azure.service-bus.topics | Azure Service Bus topics. Each Channel in an azure.service-bus.topics Broker is a Topic. |
azure.event-hubs | Azure Event Hubs. Each Channel in an azure.event-hubs Broker is a Stream. |
azure.event-grid | Azure Event Grid. Each Channel in an azure.event-grid Broker is a Topic. |
azure.event-grid.mqtt | The MQTT broker of an Azure Event Grid namespace. Each Channel in it is a Topic. |
azure.storage-queue | Azure Queue Storage, inside its storage account. Each Channel in an azure.storage-queue Broker is a Queue. |
azure.signal-r | Azure SignalR Service, pushing in real time to connected clients. Each Channel in it is a Topic. |
azure.web-pub-sub | Azure Web PubSub, pushing in real time to connected clients. Each Channel in it is a Topic. |
azure.communication-services.email | Azure Communication Services Email. Each Channel in it is a Mailbox, the sender address. |
azure.communication-services.sms | Azure Communication Services SMS. Each Channel in it is an Sms sender. |
azure.notification-hubs | Azure Notification Hubs. Each Channel in it is a Push. |
aws.sqs | Amazon SQS. Each Channel in an aws.sqs Broker is a Queue. |
aws.sns | Amazon SNS. Each Channel in an aws.sns Broker is a Topic. |
aws.event-bridge | An Amazon EventBridge event bus. Each Channel in it is a Topic. |
aws.kinesis | Amazon Kinesis Data Streams. Each Channel in it is a Stream. |
aws.msk | Amazon MSK. Each Channel in an aws.msk Broker is a Topic. |
aws.mq.rabbitmq | Amazon MQ for RabbitMQ. Each Channel in it states its kind, a Queue or a Topic. |
aws.mq.activemq | Amazon MQ for ActiveMQ. Each Channel in it states its kind, a Queue or a Topic. |
aws.app-sync.events | AWS AppSync Events, pushing in real time to connected clients. Each Channel in it is a Topic. |
aws.iot-core | AWS IoT Core's MQTT broker. Each Channel in it is a Topic. |
aws.ses | Amazon SES. Each Channel in an aws.ses Broker is a Mailbox, the sender address. |
aws.end-user-messaging | AWS End User Messaging, for SMS and mobile push. Each Channel in it states its kind, an Sms or a Push. |
gcp.pub-sub | Google Cloud Pub/Sub. Each Channel in a gcp.pub-sub Broker is a Topic. |
gcp.eventarc | Google Cloud Eventarc. Each Channel in it is a Topic. |
gcp.cloud-tasks | Google Cloud Tasks. Each Channel in it is a Queue. |
gcp.managed-kafka | Google Cloud Managed Service for Apache Kafka. Each Channel in it is a Topic. |
gcp.firebase-cloud-messaging | Firebase Cloud Messaging. Each Channel in it is a Push. |
Sync mechanism: How a Sync kept by no named message keeps its copy.
| Value | Means |
|---|---|
cdc | Change data capture: the source database's change log read and applied. |
etl | A scheduled extract, transform and load job. |
file | An export dropped and picked up. |
replication | A database product's own copy feature, between two Components' databases. |
In transit: What an endpoint states reaches it. Absent, nothing is stated, and it is read from the certificates and transports the model states.
| Value | Means |
|---|---|
encrypted | Only encrypted traffic reaches it, whether or not the model states its certificate. |
plaintext | Plaintext reaches it: it accepts unencrypted traffic, alone or beside encrypted. |
© 2026 Extenza Works. All rights reserved.