Skip to content

Compare SQS FIFO queue settings

Deduplication and throughput limits.

Terminal recording of kurkik sqs diff

The recording shows kurkik sqs diff on the demo sandbox; its data differs from this example.

Terminal window
kurkik sqs diff queues-staging queues-prod
queues-staging vs queues-prod
Amazon SQS queues-prod
Channel bindings
~ orders.fifo deduplicationScope — deduplicationScope differs. (queues-staging: messageGroup, queues-prod: queue)
~ orders.fifo fifoThroughputLimit — fifoThroughputLimit differs. (queues-staging: perMessageGroupId, queues-prod: perQueue)
Topic configuration
~ orders.fifo ContentBasedDeduplication — ContentBasedDeduplication differs. (queues-staging: true, queues-prod: false)
Notes
- Queues-staging is account 300000000501 and queues-prod is account 300000000502; ARNs are compared by the name they end in.
Drift: 3 changed · 0 unmanaged · 0 missing (drift) — 7 matched

Exit code 2: drift found, so a CI job can stop here.

Mark Means
~ both sides have it, but it differs
! only the first side has it
+ only the second side has it

A document and a connection (exit 2)

$ kurkik sqs diff staging.yaml queues-prod
staging.yaml vs queues-prod
AsyncAPI 3.0.0 · Amazon SQS queues-prod (us-east-1)
Channel bindings
~ orders.fifo deduplicationScope — deduplicationScope differs. (document: messageGroup, broker: queue)
~ orders.fifo fifoThroughputLimit — fifoThroughputLimit differs. (document: perMessageGroupId, broker: perQueue)
Topic configuration
~ orders.fifo ContentBasedDeduplication — ContentBasedDeduplication differs. (document: true, broker: false)
Drift: 3 changed · 0 unmanaged · 0 missing (drift) — 2 matched

Two documents (exit 0)

$ kurkik sqs diff staging.yaml prod.yaml
staging.yaml vs prod.yaml
AsyncAPI 3.0.0
Drift: 0 changed · 0 unmanaged · 0 missing (no drift) — 1 matched

Download the JSON report (-o json)

staging.yaml
asyncapi: 3.0.0
info:
title: queues-staging Amazon SQS API
version: 1.0.0-SNAPSHOT
description: Generated by reading Amazon SQS of queues-staging (us-east-1).
servers:
sqs:
host: localhost:14566
protocol: amazon-sqs
description: Amazon SQS in us-east-1.
channels:
orders.fifo:
address: orders.fifo
bindings:
sqs:
bindingVersion: 0.2.0
queue:
name: orders.fifo
fifoQueue: true
deduplicationScope: messageGroup
fifoThroughputLimit: perMessageGroupId
deliveryDelay: 0
visibilityTimeout: 30
receiveMessageWaitTime: 0
messageRetentionPeriod: 345600
x-sqs-attributes:
ContentBasedDeduplication: true
MaximumMessageSize: 1048576
SqsManagedSseEnabled: true
operations: {}

Download staging.yaml

prod.yaml
asyncapi: 3.0.0
info:
title: queues-prod Amazon SQS API
version: 1.0.0-SNAPSHOT
description: Generated by reading Amazon SQS of queues-prod (us-east-1).
servers:
sqs:
host: localhost:14566
protocol: amazon-sqs
description: Amazon SQS in us-east-1.
channels:
orders.fifo:
address: orders.fifo
bindings:
sqs:
bindingVersion: 0.2.0
queue:
name: orders.fifo
fifoQueue: true
deduplicationScope: queue
fifoThroughputLimit: perQueue
deliveryDelay: 0
visibilityTimeout: 30
receiveMessageWaitTime: 0
messageRetentionPeriod: 345600
x-sqs-attributes:
ContentBasedDeduplication: false
MaximumMessageSize: 1048576
SqsManagedSseEnabled: true
operations: {}

Download prod.yaml

How to build this setup yourself

queues-staging

Terminal window
awslocal sqs create-queue --queue-name orders.fifo --attributes '{"FifoQueue": "true", "ContentBasedDeduplication": "true", "DeduplicationScope": "messageGroup", "FifoThroughputLimit": "perMessageGroupId"}'

queues-prod

Terminal window
awslocal sqs create-queue --queue-name orders.fifo --attributes '{"FifoQueue": "true", "ContentBasedDeduplication": "false", "DeduplicationScope": "queue", "FifoThroughputLimit": "perQueue"}'

All flags: kurkik sqs diff · more Amazon SQS diff examples