USAGE
create-queue.pl options command
Use this script to perform various SQS API commands. You can use this script to create queues, list queues, send and receive messages and more.
By default if you use the create
, the script will create two queues; a primary queue and an associated dead letter queue. The dead letter queue will be created with the name as the primary queue with a 'DLQ' suffix.
Pass the --no-dlq
option if you don't want a dead letter queue.
Command
- list - list queues
- create - create the primary and dead letter queue
-
You can control the attributes of the new queue by setting the various queue options (e.g.
--visibility-timeout
, etc)Use the
--no-dlq
to prevent the dead letter queue from being created. - delete - delete the primary and dead letter queue (if it exists)
- attributes - display the queue attributes
- send-message - send a message
-
send-message message
- receive-message - receive one or more messages
-
receive-message n
- delete-message - delete a message
-
delete-message receipt-handle
OPTIONS
--help, -h
--queue, -q
Queue name. The dead letter queue will be the same name with a DLQ suffix
--endpoint-url, -e
Endpoint URL Default: https://queue.amazonaws.com
--delay-seconds, -D
Length of time, in seconds, for which the delivery of all messages in
the queue is delayed. Valid values: An integer from 0 to 900 seconds
(15 minutes). Default: 0.
--maximum-message-size, -M
The limit of how many bytes a message can contain before Amazon SQS
rejects it. Valid values: An integer from 1,024 bytes (1 KiB) to
262,144 bytes (256 KiB). Default: 262,144 (256 KiB).
--max-receive-count, -c
The number of times a message is delivered to the source queue before
being moved to the dead-letter queue. Default: 10. When the
ReceiveCount for a message exceeds the maxReceiveCount for a queue,
Amazon SQS moves the message to the dead-letter-queue.
--message-retention-period, -p
The length of time, in seconds, for which Amazon SQS retains a
message. Valid values: An integer from 60 seconds (1 minute) to
1,209,600 seconds (14 days). Default: 345,600 (4 days). When you
change a queue's attributes, the change can take up to 60 seconds for
most of the attributes to propagate throughout the Amazon SQS
system. Changes made to the MessageRetentionPeriod attribute can take
up to 15 minutes and will impact existing messages in the queue
potentially causing them to be expired and deleted if the
MessageRetentionPeriod is reduced below the age of existing messages.
--receive-message-wait-time_seconds, -w
The length of time, in seconds, for which a ReceiveMessage action
waits for a message to arrive. Valid values: An integer from 0 to 20
(seconds). Default: 0.
--visibility-timeout, -v
The visibility timeout for the queue, in seconds. Valid values: An
integer from 0 to 43,200 (12 hours). Default: 30. For more
information about the visibility timeout, see Visibility Timeout in
the Amazon SQS Developer Guide.
AUTHOR
Rob Lauer - <bigfoot@cpan.org>