Publish/Subscribe Operations
Document event-driven APIs with publish and subscribe operations
Operations in AsyncAPI are defined underneath the operations
key, with channels defined under the channels
key. Below is an example of defining publish and subscribe operations:
asyncapi.yml
Message examples
You can provide examples of messages by using the examples
key in your message definitions:
asyncapi.yml
Publish operations
Publish operations represent messages that your service sends to a channel:
asyncapi.yml
Subscribe operations
Subscribe operations represent messages that your service receives from a channel:
asyncapi.yml
Bi-directional communication
You can define both publish and subscribe operations for the same channel to enable bi-directional communication:
asyncapi.yml