Message Formats
Define message schemas, content types, and structure for event-driven communication
Define message schemas, content types, and structure for event-driven communication
Messages in AsyncAPI are defined in the components.messages section and referenced from channels and operations. They define the structure and format of data exchanged through your event-driven API.
The payload defines the structure of the message data:
You can define headers that are sent with your messages:
AsyncAPI supports various content types for messages:
Provide concrete examples to help developers understand your message format:
Use traits to share common message properties across multiple messages:
This approach helps maintain consistency across your message definitions while reducing duplication.