diff --git a/CODEOWNERS b/CODEOWNERS
index b97cdeea..aa30dea0 100644
--- a/CODEOWNERS
+++ b/CODEOWNERS
@@ -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
diff --git a/sns/README.md b/sns/README.md
index 26a78576..4ef43ec5 100644
--- a/sns/README.md
+++ b/sns/README.md
@@ -113,7 +113,8 @@ We support an array of consumers via the **consumers** field. This allows you to
|---|:---:|---|
| `protocol` | string | **Required.** The protocol that this endpoint receives messages by. Can be `http`, `https`, `email`, `email-json`, `sms`, `sqs`, `application`, `lambda` or `firehose` |
| `endpoint` |[identifier](#identifier)| **Required.** The endpoint messages are delivered to. |
-| `filterPolicy` | [filterPolicy](#filter-policy) | **Optional.** Only receive a subset of messages from the channel, determined by this policy. |
+| `filterPolicy` | object | **Optional.** Only receive a subset of messages from the channel, determined by this policy. |
+| `filterPolicyScope` | string | **Optional.** Determines whether the FilterPolicy applies to MessageAttributes (default) or MessageBody. |
| `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. |
| `redrivePolicy` | [redrivePolicy](#redrive-policy) | **Optional.** Prevent poison pill messages by moving un-processable messages to an SQS dead letter queue. |
| `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). |
@@ -132,11 +133,6 @@ We support an array of consumers via the **consumers** field. This allows you to
| `backoffFunction` | string, one of: arithmetic, exponential, geometric or linear | **Optional.** The algorithm for backoff between retries |
| `maxReceivesPerSecond` | integer | **Optional.** The maximum number of deliveries per second, per subscription |
-#### Filter Policy
-|Field Name | Type | Description|
-|---|:---:|---|
-| `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|
|---|:---:|---|
@@ -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
@@ -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
diff --git a/sns/json_schemas/operation.json b/sns/json_schemas/operation.json
index df59a327..25eb5935 100644
--- a/sns/json_schemas/operation.json
+++ b/sns/json_schemas/operation.json
@@ -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",
@@ -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.",
@@ -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": {
@@ -274,4 +270,4 @@
]
}
]
-}
\ No newline at end of file
+}
diff --git a/sqs/README.md b/sqs/README.md
index 1475139d..f632b66d 100644
--- a/sqs/README.md
+++ b/sqs/README.md
@@ -127,7 +127,7 @@ channels:
sqs:
queue:
name: user-signedup-queue
- type: standard
+ fifoQueue: false
receiveMessageWaitTime: 4
redrivePolicy:
deadLetterQueue:
@@ -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
@@ -218,7 +218,7 @@ channels:
sqs:
queues:
- name: user-signedup-queue
- type: standard
+ fifoQueue: false
receiveMessageWaitTime: 4
policy:
statements:
@@ -230,7 +230,7 @@ channels:
action: Sqs:ReceiveMessage
- name: user-signedup-dlq
messageRetentionPeriod: 1209600
- type: standard
+ fifoQueue: false
```