Liking cljdoc? Tell your friends :D

piped.consumers

Code relating to reading SQS messages from channels and processing them.

Code relating to reading SQS messages from channels and processing them.
raw docstring

spawn-consumer-asyncclj

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

spawn-consumer-blockingclj

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

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

× close