Reading AsyncAPI 2 and 3 Files: Channels, Operations and Messages
How AsyncAPI describes event-driven services, what changed between 2.x and 3.0, and how to validate a file, see its flows and export documentation.

Event-driven systems are hard to document. A service might publish to five Kafka topics, consume from three more, and change message formats over time. AsyncAPI gives these systems a standard description, much as OpenAPI does for HTTP APIs. This guide covers the essentials of the format, the important differences between versions 2 and 3, and how to work with files using the AsyncAPI Viewer and Validator.
What an AsyncAPI document describes
An AsyncAPI file has a few main parts:
- Info: the title and version of the application, plus a description.
- Servers: the brokers the application connects to, each with a protocol such as kafka, mqtt, amqp or ws.
- Channels: the topics, queues or routing keys messages travel through.
- Operations: what the application does on each channel, either sending or receiving.
- Messages and schemas: the payload structure, usually JSON Schema, and metadata such as content type.
What changed in version 3
In version 2, each channel carried publish and subscribe operations, and their meaning was the opposite of what most people expect. Publish described what other applications publish to the channel, so the documented application receives those messages. Subscribe meant the application sends. Teams regularly drew their architecture diagrams backwards because of this.
Version 3 fixed it. Channels now have an address and a list of messages and nothing else. Operations live in their own section, each with an explicit action of send or receive and a reference to a channel. Channel addresses can contain parameters in braces, which must be defined. Messages are reusable across channels.
The viewer reads both versions into the same model, so the channel list and the diagram always describe what your application sends and receives, whichever version the file uses.
Validating a file
Paste or open the document and the validator checks the structure that tools rely on: the version field, info title and version, server host or URL and protocol, a message for every version 2 operation, a valid action and existing channel for every version 3 operation, defined parameters for every placeholder in a channel address, and every local reference. Problems appear in a validation tab with a plain explanation.
Exploring channels and messages
The channel list shows each address with send and receive badges and its message count. Selecting a channel shows its parameters, operations and every message with the payload schema and a generated example. Examples use the schema's own examples and defaults when present, enum values, and realistic formats for uuid, email and date-time fields. Copy them or download them as JSON fixtures for consumer tests.
The flow diagram
The diagram places the application in the centre, channels it sends to on the right with green arrows and channels it receives from on the left with amber arrows. It is a quick way to check that a file describes the service the way its team thinks it works. Download it as SVG for architecture documents.
Sharing documentation
The export button writes a single HTML file containing the servers, the diagram, every channel, message, schema and example. It needs no server and can be attached to a wiki page or sent to another team.
Good habits for AsyncAPI files
- Give every message a name and a content type.
- Add examples to schemas so generated documentation shows realistic data.
- Keep one document per application rather than one per topic.
- Version the document alongside the code that produces the events.
Limits
The checks are structural and do not replace full JSON Schema validation against the official specification. External references, traits and protocol bindings are shown as written but not loaded or validated, and conversion from version 2 to 3 is not performed.



