Skip to content

Commit

Permalink
Merge branch 'master' into mqttv5-bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
smoya authored Oct 25, 2023
2 parents 737b865 + 6a3537d commit 1980587
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 68 deletions.
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

* @derberg @fmvilas @dalelane @smoya @char0n @asyncapi-bot-eve

/anypointmq/ @GeraldLoeffler
/anypointmq/ @mboss37 @GeraldLoeffler
/ibmmq/ @rcoppen
/jms/ @rcoppen @SrfHead
/kafka/ @lbroudoux @dalelane
Expand Down
19 changes: 7 additions & 12 deletions sns/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ We support an array of consumers via the **consumers** field. This allows you to
|---|:---:|---|
| <a name="operationBindingObjectProtocol"></a>`protocol` | string | **Required.** The protocol that this endpoint receives messages by. Can be `http`, `https`, `email`, `email-json`, `sms`, `sqs`, `application`, `lambda` or `firehose` |
| <a name="operationBindingObjectEndpoint"></a>`endpoint` |[identifier](#identifier)| **Required.** The endpoint messages are delivered to. |
| <a name="operationBindingObjectFilerPolicy"></a>`filterPolicy` | [filterPolicy](#filter-policy) | **Optional.** Only receive a subset of messages from the channel, determined by this policy. |
| <a name="operationBindingObjectFilterPolicy"></a>`filterPolicy` | object | **Optional.** Only receive a subset of messages from the channel, determined by this policy. |
| <a name="operationBindingObjectFilterPolicyScope"></a>`filterPolicyScope` | string | **Optional.** Determines whether the FilterPolicy applies to MessageAttributes (default) or MessageBody. |
| <a name="operationBindingObjectRawMessageDelivery"></a>`rawMessageDelivery` | boolean | **Required.** If *true* AWS SNS attributes are removed from the body, and for SQS, SNS message attributes are copied to SQS message attributes. If *false* the SNS attributes are included in the body. |
| <a name="operationBindingObjectRedrivePolicy"></a>`redrivePolicy` | [redrivePolicy](#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue. |
| <a name="operationBindingObjectDeliveryPolicy"></a>`deliveryPolicy` | [deliveryPolicy](#delivery-policy) | **Optional.** Policy for retries to HTTP. The parameter is for that [SNS Subscription](https://docs.aws.amazon.com/sns/latest/api/API_Subscribe.html) and overrides any policy on the [SNS Topic](https://docs.aws.amazon.com/sns/latest/api/API_CreateTopic.html). |
Expand All @@ -132,11 +133,6 @@ We support an array of consumers via the **consumers** field. This allows you to
| <a name="channelBindingDeliveryPolicyObjectBackoffFunction"></a>`backoffFunction` | string, one of: arithmetic, exponential, geometric or linear | **Optional.** The algorithm for backoff between retries |
| <a name="channelBindingDeliveryPolicyObjectMaxReceivesPerSecond"></a>`maxReceivesPerSecond` | integer | **Optional.** The maximum number of deliveries per second, per subscription |

#### Filter Policy
|Field Name | Type | Description|
|---|:---:|---|
| <a name="filterPolicyObjectAttributes"></a>`attributes` |Map(string, array or string or object) | **Required.** A map of a message attribute to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint |

#### Identifier
|Field Name | Type | Description|
|---|:---:|---|
Expand Down Expand Up @@ -221,9 +217,8 @@ channels:
name: user-signedup-queue # refers to a queue defined in this file, but not shown in this example
rawMessageDelivery: true
filterPolicy:
attributes:
reason:
anything-but: password-reset
reason:
anything-but: password-reset
redrivePolicy:
deadLetterQueue:
name: user-signedup-queue-dlq # refers toa queue defined in this file, but not show in this example
Expand Down Expand Up @@ -281,9 +276,9 @@ channels:
endpoint:
url: http://login.my.com/user/new
filterPolicy:
attributes:
reason:
anything-but: password-reset
reason:
anything-but: password-reset
filterPolicyScope: MessageBody
deliveryPolicy:
minDelayTarget: 1
maxDelayTarget: 120
Expand Down
98 changes: 47 additions & 51 deletions sns/json_schemas/operation.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,38 @@
"$ref": "#/definitions/identifier"
},
"filterPolicy": {
"$ref": "#/definitions/filterPolicy"
"type": "object",
"description": "Only receive a subset of messages from the channel, determined by this policy. Depending on the FilterPolicyScope, a map of either a message attribute or message body to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.",
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension"
}
},
"additionalProperties": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
},
{
"type": "object"
}
]
}
},
"filterPolicyScope": {
"type": "string",
"description": "Determines whether the FilterPolicy applies to MessageAttributes or MessageBody.",
"enum": [
"MessageAttributes",
"MessageBody"
],
"default": "MessageAttributes"
},
"rawMessageDelivery": {
"type": "boolean",
Expand Down Expand Up @@ -167,40 +198,6 @@
}
}
},
"filterPolicy": {
"type": "object",
"description": "Only receive a subset of messages from the channel, determined by this policy.",
"patternProperties": {
"^x-[\\w\\d\\.\\-\\_]+$": {
"$ref": "https://raw.githubusercontent.com/asyncapi/spec-json-schemas/v2.14.0/schemas/2.4.0.json#/definitions/specificationExtension"
}
},
"properties": {
"attributes": {
"type": "object",
"description": "A map of a message attribute to an array of possible matches. The match may be a simple string for an exact match, but it may also be an object that represents a constraint and values for that constraint.",
"additionalProperties": {
"oneOf": [
{
"type": "array",
"items": {
"type": "string"
}
},
{
"type": "string"
},
{
"type": "object"
}
]
}
}
},
"required": [
"attributes"
]
},
"redrivePolicy": {
"type": "object",
"description": "Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue.",
Expand Down Expand Up @@ -237,22 +234,21 @@
"name": "someQueue"
},
"filterPolicy": {
"attributes": {
"store": [
"asyncapi_corp"
],
"event": [
{
"anything-but": "order_cancelled"
}
],
"customer_interests": [
"rugby",
"football",
"baseball"
]
}
"store": [
"asyncapi_corp"
],
"event": [
{
"anything-but": "order_cancelled"
}
],
"customer_interests": [
"rugby",
"football",
"baseball"
]
},
"filterPolicyScope": "MessageAttributes",
"rawMessageDelivery": false,
"redrivePolicy": {
"deadLetterQueue": {
Expand All @@ -274,4 +270,4 @@
]
}
]
}
}
8 changes: 4 additions & 4 deletions sqs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ channels:
sqs:
queue:
name: user-signedup-queue
type: standard
fifoQueue: false
receiveMessageWaitTime: 4
redrivePolicy:
deadLetterQueue:
Expand All @@ -143,7 +143,7 @@ channels:
deadLetterQueue:
name: user-signedup-dlq
messageRetentionPeriod: 1209600
type: standard
fifoQueue: false
subscribe:
operationId: sendMessage
description: sends messages when a user has signed up
Expand Down Expand Up @@ -218,7 +218,7 @@ channels:
sqs:
queues:
- name: user-signedup-queue
type: standard
fifoQueue: false
receiveMessageWaitTime: 4
policy:
statements:
Expand All @@ -230,7 +230,7 @@ channels:
action: Sqs:ReceiveMessage
- name: user-signedup-dlq
messageRetentionPeriod: 1209600
type: standard
fifoQueue: false
```
<a name="message"></a>
Expand Down

0 comments on commit 1980587

Please sign in to comment.