Skip to content

Commit

Permalink
feat: add messageId property (#751)
Browse files Browse the repository at this point in the history
  • Loading branch information
WaleedAshraf authored Apr 22, 2022
1 parent 34363f6 commit e285fb4
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions spec/asyncapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,7 @@ Describes a message received on a given channel and operation.

Field Name | Type | Description
---|:---:|---
<a name="messageObjectMessageId"></a>messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions.
<a name="messageObjectHeaders"></a>headers | [Schema Object](#schemaObject) &#124; [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers.
<a name="messageObjectPayload"></a>payload | `any` | Definition of the message payload. It can be of any type but defaults to [Schema object](#schemaObject). It must match the schema format, including encoding type - e.g Avro should be inlined as either a YAML or JSON object NOT a string to be parsed as YAML or JSON.
<a name="messageObjectCorrelationId"></a>correlationId | [Correlation ID Object](#correlationIdObject) &#124; [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching.
Expand Down Expand Up @@ -1117,6 +1118,7 @@ Name | Allowed values | Notes

```json
{
"messageId": "userSignup",
"name": "UserSignup",
"title": "User signup",
"summary": "Action to sign a user up.",
Expand Down Expand Up @@ -1180,6 +1182,7 @@ Name | Allowed values | Notes
```

```yaml
messageId: userSignup
name: UserSignup
title: User signup
summary: Action to sign a user up.
Expand Down Expand Up @@ -1227,6 +1230,7 @@ Example using Avro to define the payload:

```json
{
"messageId": "userSignup",
"name": "UserSignup",
"title": "User signup",
"summary": "Action to sign a user up.",
Expand All @@ -1244,6 +1248,7 @@ Example using Avro to define the payload:
```

```yaml
messageId: userSignup
name: UserSignup
title: User signup
summary: Action to sign a user up.
Expand Down Expand Up @@ -1273,6 +1278,7 @@ If you're looking to apply traits to an operation, see the [Operation Trait Obje

Field Name | Type | Description
---|:---:|---
<a name="messageTraitObjectMessageId"></a>messageId | `string` | Unique string used to identify the message. The id MUST be unique among all messages described in the API. The messageId value is **case-sensitive**. Tools and libraries MAY use the messageId to uniquely identify a message, therefore, it is RECOMMENDED to follow common programming naming conventions.
<a name="messageTraitObjectHeaders"></a>headers | [Schema Object](#schemaObject) &#124; [Reference Object](#referenceObject) | Schema definition of the application headers. Schema MUST be of type "object". It **MUST NOT** define the protocol headers.
<a name="messageTraitObjectCorrelationId"></a>correlationId | [Correlation ID Object](#correlationIdObject) &#124; [Reference Object](#referenceObject) | Definition of the correlation ID used for message tracing or matching.
<a name="messageTraitObjectSchemaFormat"></a>schemaFormat | `string` | A string containing the name of the schema format/language used to define the message payload. If omitted, implementations should parse the payload as a [Schema object](#schemaObject).
Expand Down

0 comments on commit e285fb4

Please sign in to comment.