From 0e4ced1406fca0ddccdac6f3405837885079bc79 Mon Sep 17 00:00:00 2001 From: "adam.gloyne" Date: Thu, 26 Oct 2023 09:48:24 +0100 Subject: [PATCH 1/4] docs: Add high throughput properties for fifo --- sqs/README.md | 2 ++ sqs/json_schemas/channel.json | 12 ++++++++++++ sqs/json_schemas/operation.json | 10 ++++++++++ 3 files changed, 24 insertions(+) diff --git a/sqs/README.md b/sqs/README.md index f632b66d..d62db3a2 100644 --- a/sqs/README.md +++ b/sqs/README.md @@ -48,6 +48,8 @@ An SQS queue can set up a Dead Letter Queue as part of a Redelivery Policy. To s |---|:---:|---| | `name` | string | **Required.** The name of the queue. When an [SNS Operation Binding Object]() references an SQS queue by name, the identifier should be the one in this field.| | `fifoQueue` | boolean | **Required.** Is this a FIFO queue? | +| `deduplicationScope` | string | **Optional.** Specifies whether message deduplication occurs at the message group or queue level. Valid values are `messageGroup` and `queue`. **This property applies only to high throughput for FIFO queues.** | +| `fifoThroughputLimit` | string | **Optional.** Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are `perQueue` and `perMessageGroupId`. **The `perMessageGroupId` value is allowed only when the value for DeduplicationScope is `messageGroup`. Setting both these values as such will enable high throughput on a FIFO queue. As above, this property applies only to high throughput for FIFO queues.** | | `deliveryDelay` | integer | **Optional.** The number of seconds to delay before a message sent to the queue can be received. Used to create a *delay queue*. Range is 0 to 15 minutes. Defaults to 0. | | `visibilityTimeout` |integer| **Optional.** The length of time, in seconds, that a consumer locks a message - hiding it from reads - before it is unlocked and can be read again. Range from 0 to 12 hours (43200 seconds). Defaults to 30 seconds. | | `receiveMessageWaitTime` |integer| **Optional.** Determines if the queue uses [short polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html) or [long polling](https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-short-and-long-polling.html). Set to zero (the default) the queue reads available messages and returns immediately. Set to a non-zero integer, long polling waits the specified number of seconds for messages to arrive before returning. | diff --git a/sqs/json_schemas/channel.json b/sqs/json_schemas/channel.json index 3930780a..fd8d4460 100644 --- a/sqs/json_schemas/channel.json +++ b/sqs/json_schemas/channel.json @@ -47,6 +47,16 @@ "description": "Is this a FIFO queue?", "default": false }, + "deduplicationScope": { + "type": "string", + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, "deliveryDelay": { "type": "integer", "description": "The number of seconds to delay before a message sent to the queue can be received. used to create a delay queue.", @@ -207,6 +217,8 @@ "queue": { "name": "myQueue", "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", "deliveryDelay": 15, "visibilityTimeout": 60, "receiveMessageWaitTime": 0, diff --git a/sqs/json_schemas/operation.json b/sqs/json_schemas/operation.json index 9f26e977..0320c7de 100644 --- a/sqs/json_schemas/operation.json +++ b/sqs/json_schemas/operation.json @@ -50,6 +50,16 @@ "description": "Is this a FIFO queue?", "default": false }, + "deduplicationScope": { + "type": "string", + "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", + "default": "queue" + }, + "fifoThroughputLimit": { + "type": "string", + "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", + "default": "perQueue" + }, "deliveryDelay": { "type": "integer", "description": "The number of seconds to delay before a message sent to the queue can be received. Used to create a delay queue.", From e0eccf56f961d7b49a6f777408ee36bb292e8b76 Mon Sep 17 00:00:00 2001 From: "adam.gloyne" Date: Thu, 26 Oct 2023 14:52:51 +0100 Subject: [PATCH 2/4] Use enums --- sqs/json_schemas/channel.json | 2 ++ sqs/json_schemas/operation.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sqs/json_schemas/channel.json b/sqs/json_schemas/channel.json index fd8d4460..c5856e77 100644 --- a/sqs/json_schemas/channel.json +++ b/sqs/json_schemas/channel.json @@ -49,11 +49,13 @@ }, "deduplicationScope": { "type": "string", + "enum": ["queue", "messageGroup"], "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", "default": "queue" }, "fifoThroughputLimit": { "type": "string", + "enum": ["perQueue", "perMessageGroupId"], "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", "default": "perQueue" }, diff --git a/sqs/json_schemas/operation.json b/sqs/json_schemas/operation.json index 0320c7de..48a14a14 100644 --- a/sqs/json_schemas/operation.json +++ b/sqs/json_schemas/operation.json @@ -52,11 +52,13 @@ }, "deduplicationScope": { "type": "string", + "enum": ["queue", "messageGroup"], "description": "Specifies whether message deduplication occurs at the message group or queue level. Valid values are messageGroup and queue (default).", "default": "queue" }, "fifoThroughputLimit": { "type": "string", + "enum": ["perQueue", "perMessageGroupId"], "description": "Specifies whether the FIFO queue throughput quota applies to the entire queue or per message group. Valid values are perQueue (default) and perMessageGroupId.", "default": "perQueue" }, From 82df278cbada0e9e4feaa8e163fc1921d2686c03 Mon Sep 17 00:00:00 2001 From: "adam.gloyne" Date: Thu, 26 Oct 2023 14:55:00 +0100 Subject: [PATCH 3/4] Add another example --- sqs/json_schemas/operation.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sqs/json_schemas/operation.json b/sqs/json_schemas/operation.json index 48a14a14..e32880d8 100644 --- a/sqs/json_schemas/operation.json +++ b/sqs/json_schemas/operation.json @@ -221,6 +221,9 @@ "queues": [ { "name": "myQueue", + "fifoQueue": true, + "deduplicationScope": "messageGroup", + "fifoThroughputLimit": "perMessageGroupId", "deliveryDelay": 10, "redrivePolicy": { "deadLetterQueue": { From 30c6e1ceba6757e4f02b4242c7281e6cdd9e9061 Mon Sep 17 00:00:00 2001 From: "adam.gloyne" Date: Thu, 26 Oct 2023 16:10:59 +0100 Subject: [PATCH 4/4] Bump version --- sqs/README.md | 2 +- sqs/json_schemas/channel.json | 6 +++++- sqs/json_schemas/operation.json | 6 +++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/sqs/README.md b/sqs/README.md index d62db3a2..5f8281ed 100644 --- a/sqs/README.md +++ b/sqs/README.md @@ -12,7 +12,7 @@ For publish-subscribe scenarios, use as a **publish** Operation Binding Object, ## Version -Current version is `0.1.0`. +Current version is `0.2.0`. diff --git a/sqs/json_schemas/channel.json b/sqs/json_schemas/channel.json index c5856e77..6e5279d7 100644 --- a/sqs/json_schemas/channel.json +++ b/sqs/json_schemas/channel.json @@ -21,7 +21,11 @@ }, "bindingVersion": { "type": "string", - "description": "The version of this binding.", + "enum": [ + "0.1.0", + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", "default": "latest" } }, diff --git a/sqs/json_schemas/operation.json b/sqs/json_schemas/operation.json index e32880d8..9bd1e5bf 100644 --- a/sqs/json_schemas/operation.json +++ b/sqs/json_schemas/operation.json @@ -20,7 +20,11 @@ }, "bindingVersion": { "type": "string", - "description": "The version of this binding.", + "enum": [ + "0.1.0", + "0.2.0" + ], + "description": "The version of this binding. If omitted, 'latest' MUST be assumed.", "default": "latest" } },