AWS SQS
https://github.com/samoconnor/AWSSQS.jl
AWSSQS.sqs_arn
AWSSQS.sqs_busy_count
AWSSQS.sqs_count
AWSSQS.sqs_create_queue
AWSSQS.sqs_delete_message
AWSSQS.sqs_delete_queue
AWSSQS.sqs_flush
AWSSQS.sqs_get_queue
AWSSQS.sqs_get_queue_attributes
AWSSQS.sqs_list_queues
AWSSQS.sqs_messages
AWSSQS.sqs_name
AWSSQS.sqs_receive_message
AWSSQS.sqs_send_message
AWSSQS.sqs_send_message_batch
AWSSQS.sqs_set_policy
SQS Queues
AWSSQS.sqs_list_queues
— Function.sqs_list_queues([::AWSConfig], prefix="")
Returns a list of ::AWSQueue
.
for q in sqs_list_queues()
println("$(sqs_name(q)) has ~$(sqs_count(q)) messages.")
end
AWSSQS.sqs_get_queue
— Function.sqs_get_queue([::AWSConfig], name)
Look up a queue by name. Returns ::AWSQueue
.
q = sqs_get_queue("my-queue")
sqs_send_message(q, "my message")
AWSSQS.sqs_create_queue
— Function.sqs_create_queue([::AWSConfig], name; options...)
Create new queue with name
. Returns ::AWSQueue
.
options
: VisibilityTimeout
, MessageRetentionPeriod
, DelaySeconds
etc...
See SQS API Reference for detail.
q = sqs_create_queue("my-queue")
sqs_send_message(q, "my message")
AWSSQS.sqs_set_policy
— Function.sqs_set_policy(::AWSQueue, policy)
Set access policy
for a queue.
AWSSQS.sqs_delete_queue
— Function.sqs_delete_queue(::AWSQueue)
Delete a queue.
SQS Messages
AWSSQS.sqs_send_message
— Function.sqs_send_message(::AWSQueue, message)
Send a message
to a queue.
AWSSQS.sqs_send_message_batch
— Function.sqs_send_message_batch(::AWSQueue, messages)
Send a collection of messages
to a queue.
AWSSQS.sqs_receive_message
— Function.sqs_receive_message(::AWSQueue)
Returns a Dict
containing :message
and :handle
or nothing
if the queue is empty.
m = sqs_receive_message(q)
println(m[:message])
sqs_delete_message(m)
AWSSQS.sqs_messages
— Function.sqs_messages(::AWSQueue)
Returns an iterator that retrieves messages from a queue.
for m in sqs_messages(q)
println(m[:message])
sqs_delete_message(m)
end
AWSSQS.sqs_delete_message
— Function.sqs_delete_message(::AWSQueue, message)
Delete a message
from a queue.
AWSSQS.sqs_flush
— Function.sqs_flush(::AWSQueue)
Delete all messages from a queue.
SQS Metadata
AWSSQS.sqs_name
— Function.sqs_name(::AWSQueue)
Name of a queue.
AWSSQS.sqs_arn
— Function.sqs_arn(::AWSQueue)
ARN of a queue.
AWSSQS.sqs_get_queue_attributes
— Function.sqs_get_queue_attributes(::AWSQueue)
Get Queue Attributes for a queue.
AWSSQS.sqs_count
— Function.sqs_count(::AWSQueue)
Approximate number of messages in a queue.
AWSSQS.sqs_busy_count
— Function.sqs_busy_count(::AWSQueue)
Approximate number of messages not visible in a queue.