(ack {:keys [client queue-url]} {:keys [receipt-handle]})
Remove the message from the queue.
Input: connection - as created by mk-connection message - the message to ack
Remove the message from the queue. Input: connection - as created by mk-connection message - the message to ack
How long to wait before retrying a non-responding compute request.
How long to wait before retrying a non-responding compute request.
(configure-queue queue-name
&
{:keys [client queue-attributes dead-letter
dead-letter-queue-attributes]})
Update an SQS queue with the provided configuration. This should be done once at startup time, when you need to (re)configure the queue.
The queue attribute maps must be from string to string, with keys matching standard SQS attribute names.
Optionally takes the name of a dead-letter queue, where messages that failed too many times will go. http://aws.typepad.com/aws/2014/01/amazon-sqs-new-dead-letter-queue.html
The queue will be created if it does not exist. A dead letter queue will be created if specified and it does not exist.
Input: queue-name - The name of the queue to be configured.
Optional arguments: :queue-attributes - attribute map for the main queue :dead-letter - name of dead letter queue :dead-letter-queue-attributes - attribute map for the dead letter queue
Update an SQS queue with the provided configuration. This should be done once at startup time, when you need to (re)configure the queue. The queue attribute maps must be from string to string, with keys matching standard SQS attribute names. Optionally takes the name of a dead-letter queue, where messages that failed too many times will go. http://aws.typepad.com/aws/2014/01/amazon-sqs-new-dead-letter-queue.html The queue will be created if it does not exist. A dead letter queue will be created if specified and it does not exist. Input: queue-name - The name of the queue to be configured. Optional arguments: :queue-attributes - attribute map for the main queue :dead-letter - name of dead letter queue :dead-letter-queue-attributes - attribute map for the dead letter queue
(dequeue & args)
Read messages from a queue. If there is nothing to read before poll-timeout-seconds, return [].
This does not remove the messages from the queue! For that, see ack.
In case of exception, logs the exception and returns [].
Read messages from a queue. If there is nothing to read before poll-timeout-seconds, return []. This does *not* remove the messages from the queue! For that, see ack. In case of exception, logs the exception and returns [].
(dequeue* {:keys [client queue-name queue-url]}
&
{:keys [limit attributes message-attributes]
:or {limit 10 attributes #{"All"} message-attributes #{"All"}}})
Read messages from a queue. If there is nothing to read before poll-timeout-seconds, return [].
This does not remove the messages from the queue! For that, see ack.
Does not catch Exceptions that might be thrown while attempting to receive messages from the queue.
Read messages from a queue. If there is nothing to read before poll-timeout-seconds, return []. This does *not* remove the messages from the queue! For that, see ack. Does not catch Exceptions that might be thrown while attempting to receive messages from the queue.
(enqueue queue-connection message & {:as opts})
Enqueues a message to a queue.
Input: queue-connection - A connection to a queue made with mk-connection message - The message to be placed on the queue
Optional arguments: :message-attributes - A map of SQS Attributes to apply to this message. :serialization-fn - A function that serializes the message you want to enqueue to a string :message-group-id - This parameter applies to FIFO queues only :message-deduplication-id - This parameter applies to FIFO queues only
By default, pr-str will be used
Enqueues a message to a queue. Input: queue-connection - A connection to a queue made with mk-connection message - The message to be placed on the queue Optional arguments: :message-attributes - A map of SQS Attributes to apply to this message. :serialization-fn - A function that serializes the message you want to enqueue to a string :message-group-id - This parameter applies to FIFO queues only :message-deduplication-id - This parameter applies to FIFO queues only By default, pr-str will be used
Maximum number of retries before sending a message to the dead letter queue.
Maximum number of retries before sending a message to the dead letter queue.
(mk-connection queue-name & {:keys [client] :as options})
Make an SQS connection to a queue identified by string queue-name. This should be done once at startup time.
Will throw QueueDoesNotExistException if the queue does not exist.
configure-queue
can be used to create and configure the queue.
Make an SQS connection to a queue identified by string queue-name. This should be done once at startup time. Will throw QueueDoesNotExistException if the queue does not exist. `configure-queue` can be used to create and configure the queue.
(nack connection message)
(nack {:keys [client queue-url]}
{:keys [receipt-handle]}
nack-visibility-seconds)
Put the message back on the queue.
Input: connection - as created by mk-connection message - the message to nack nack-visibility-seconds (optional) - How long to wait before retrying a failed compute request. Defaults to 0.
Put the message back on the queue. Input: connection - as created by mk-connection message - the message to nack nack-visibility-seconds (optional) - How long to wait before retrying a failed compute request. Defaults to 0.
How long to wait for a response when polling for new messages on the queue.
How long to wait for a response when polling for new messages on the queue.
(shutdown-default-client {:keys [client default-client?]})
Shuts down SQS client object if it was automaticalled created.
Shuts down SQS client object if it was automaticalled created.
(valid-queue-name? queue-name)
Returns true if an SQS queue name is valid, false otherwise
Returns true if an SQS queue name is valid, false otherwise
(validate-queue-name! queue-name)
Validates input for SQS queue names.
Returns nil, or throws an IllegalArgumentException on invalid queue name.
Validates input for SQS queue names. Returns nil, or throws an IllegalArgumentException on invalid queue name.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close