Publish/Subscribe Operations
Publish/Subscribe Operations
Publish/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:
You can provide examples of messages by using the examples key in your message definitions:
Publish operations represent messages that your service sends to a channel:
Subscribe operations represent messages that your service receives from a channel:
You can define both publish and subscribe operations for the same channel to enable bi-directional communication: