AsyncAPI
AsyncAPI Specification
Judgement: Adopt
The OpenAPI-equivalent for event APIs once you commit to documenting them.
Open-source standard for defining event-driven and message-based APIs across protocols like Kafka, AMQP, MQTT, WebSocket, and NATS.
Where OpenAPI describes synchronous request/response, AsyncAPI describes asynchronous channels. The two specifications are intentionally aligned in style.
Example
The same idea as OpenAPI, but the unit is a channel and a message rather than a path and a response.
asyncapi: 3.1.0
info:
title: Account Service
version: 1.0.0
description: This service is in charge of processing user signups
channels:
userSignedup:
address: user/signedup
messages:
UserSignedUp:
$ref: '#/components/messages/UserSignedUp'
operations:
sendUserSignedup:
action: send
channel:
$ref: '#/channels/userSignedup'
components:
messages:
UserSignedUp:
payload:
type: object
properties:
displayName: { type: string }
email: { type: string, format: email }
At a glance
- Category
- Contracts
- Governance
- AsyncAPI Initiative, Linux Foundation
- Status
- Stable; v3 current
- First released
- 2017
Links
Related standards
Other standards in Contracts.
- GraphQL
- ODCS — Open Data Contract Standard
- OpenAPI — OpenAPI Specification
- gRPC — gRPC Remote Procedure Call
- OData — Open Data Protocol (v4)
See AsyncAPI in context
Open the interactive Data Landscape to compare AsyncAPI against every other open standard, or grab the raw JSON. Spotted something wrong? Open an issue.