Code relating to reading SQS messages from channels and processing them.
Code relating to reading SQS messages from channels and processing them.
(spawn-consumer-async client input-chan ack-chan nack-chan consumer-fn)Spawns a consumer fit for cpu bound or asynchronous tasks. Uses the core.async dispatch thread pool.
:client - an aws-api sqs client instance :input-chan - a channel of incoming sqs messages :ack-chan - a channel that accepts messages that should be acked :nack-chan - a channel that accepts messages that should be nacked :consumer-fn - a function of a message that either returns a result directly or may return a core.async channel that emits once (like a promise chan) when finished processing the message. Must not block.
Spawns a consumer fit for cpu bound or asynchronous tasks. Uses the core.async dispatch thread pool.
:client - an aws-api sqs client instance
:input-chan - a channel of incoming sqs messages
:ack-chan - a channel that accepts messages that should be acked
:nack-chan - a channel that accepts messages that should be nacked
:consumer-fn - a function of a message that either returns a result directly
or may return a core.async channel that emits once (like a
promise chan) when finished processing the message. Must not
block.
(spawn-consumer-blocking client input-chan ack-chan nack-chan consumer-fn)Spawns a consumer fit for synchronous blocking tasks. Uses a dedicated thread when processing a message.
:client - an aws-api sqs client instance :input-chan - a channel of incoming sqs messages :ack-chan - a channel that accepts messages that should be acked :nack-chan - a channel that accepts messages that should be nacked :consumer-fn - a function of a message that may perform blocking io with the message.
Spawns a consumer fit for synchronous blocking tasks. Uses a dedicated thread when processing a message.
:client - an aws-api sqs client instance
:input-chan - a channel of incoming sqs messages
:ack-chan - a channel that accepts messages that should be acked
:nack-chan - a channel that accepts messages that should be nacked
:consumer-fn - a function of a message that may perform blocking io with
the message.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |