Liking cljdoc? Tell your friends :D

com.climate.squeedo.sqs


ackclj

(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
sourceraw docstring

auto-retry-secondsclj

How long to wait before retrying a non-responding compute request.

How long to wait before retrying a non-responding compute request.
sourceraw docstring

configure-queueclj

(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
sourceraw docstring

dequeueclj

(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.

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 [].
sourceraw docstring

enqueueclj

(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
sourceraw docstring

invalid-queue-messageclj

source

maximum-retriesclj

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.
sourceraw docstring

mk-connectionclj

(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.
sourceraw docstring

nackclj

(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.
sourceraw docstring

parse-queue-nameclj

(parse-queue-name queue-name)
source

poll-timeout-secondsclj

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.
sourceraw docstring

valid-queue-name?clj

(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
sourceraw docstring

validate-queue-name!clj

(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.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close