Liking cljdoc? Tell your friends :D

ziggurat.messaging.producer


borrow-from-poolclj

(borrow-from-pool pool)
source

delay-queue-nameclj

(delay-queue-name topic-entity queue-name)
source

get-channel-delay-exchange-nameclj

(get-channel-delay-exchange-name topic-entity channel message-payload)

This function return delay exchange name for retry when using channel flow. It will return exchange name with retry count as suffix if exponential backoff enabled.

This function return delay exchange name for retry when using channel flow. It will return exchange name with retry count as suffix if exponential backoff enabled.
sourceraw docstring

get-channel-queue-timeout-msclj

(get-channel-queue-timeout-ms topic-entity channel message-payload)

Calculate queue timeout for channel delay queue. Uses the value from [[get-exponential-backoff-timeout-ms]] if exponential backoff enabled.

Calculate queue timeout for channel delay queue. Uses the value from [[get-exponential-backoff-timeout-ms]] if exponential backoff enabled.
sourceraw docstring

get-channel-retry-countclj

(get-channel-retry-count topic-entity channel)
source

get-delay-exchange-nameclj

(get-delay-exchange-name topic-entity message-payload)

This function return delay exchange name for retry when using flow without channel. It will return exchange name with retry count as suffix if exponential backoff enabled.

This function return delay exchange name for retry when using flow without channel. It will return exchange name with retry count as suffix if exponential backoff enabled.
sourceraw docstring

get-queue-timeout-msclj

(get-queue-timeout-ms message-payload)

Calculate queue timeout for delay queue. Uses the value from [[get-exponential-backoff-timeout-ms]] if exponential backoff enabled.

Calculate queue timeout for delay queue. Uses the value from [[get-exponential-backoff-timeout-ms]] if exponential backoff enabled.
sourceraw docstring

make-queuesclj

(make-queues routes)
source

MAX_EXPONENTIAL_RETRIESclj

source

publishclj

(publish exchange message-payload)
(publish exchange message-payload expiration)
(publish exchange message-payload expiration retry-counter)
(publish exchange
         message-payload
         is-payload-serialized?
         expiration
         retry-counter
         topic-entity)

This is meant for publishing to rabbitmq.

  • Supports publishing both serialized and deserialized messages. If is-payload-serialized is true, the message won't be frozen before publishing to rabbitmq, else it would be frozen via nippy.
  • Use case(s) of sending serialized-payloads
    1. If a subscriber encounters an exception, while deserializing the message it receives from instant queue, the serialized payload is sent as is to the dead-letter-queue.
    2. If a subscriber encounters any exception while processing the message, the serialized payload is sent as is to the dead-letter-queue
  • Checks if the pool is alive - We do this so that publish does not happen after the channel pool state is stopped.
  • publish-internal returns multiple states
    • :success - Message has been successfully produced to rabbitmq
    • :retry - A retryable exception was encountered and message will be retried until it is successfully published.
    • :retry-with-counter - A non recoverable exception is encountered, but the message will be retried for a few times. defined by the counter { :rabbit-mq-connection { :publish-retry { :non-recoverable-exception {:count}}}}}
This is meant for publishing to rabbitmq.
* Supports publishing both serialized and deserialized messages. If is-payload-serialized is true, the message won't be
frozen before publishing to rabbitmq, else it would be frozen via nippy.
* Use case(s) of sending serialized-payloads
  1) If a subscriber encounters an exception, while deserializing the message it receives from instant queue,
  the serialized payload
  is sent as is to the dead-letter-queue.
  2) If a subscriber encounters any exception while processing the message, the serialized payload
  is sent as is to the dead-letter-queue
* Checks if the pool is alive - We do this so that publish does not happen after the channel pool state is stopped.
* publish-internal returns multiple states
  * :success - Message has been successfully produced to rabbitmq
  * :retry - A retryable exception was encountered and message will be retried until it is successfully published.
  * :retry-with-counter - A non recoverable exception is encountered, but the message will be retried for a few times.
  defined by the counter
    { :rabbit-mq-connection { :publish-retry { :non-recoverable-exception {:count}}}}}
sourceraw docstring

publish-to-channel-dead-queueclj

(publish-to-channel-dead-queue channel message-payload)
(publish-to-channel-dead-queue channel
                               message-payload
                               topic-entity
                               is-payload-serialized?)
source

publish-to-channel-delay-queueclj

(publish-to-channel-delay-queue channel message-payload)
source

publish-to-channel-instant-queueclj

(publish-to-channel-instant-queue channel message-payload)
source

publish-to-dead-queueclj

(publish-to-dead-queue message-payload)
(publish-to-dead-queue message-payload topic-entity is-payload-serialized?)
source

publish-to-delay-queueclj

(publish-to-delay-queue message-payload)
source

publish-to-instant-queueclj

(publish-to-instant-queue message-payload)
source

retryclj

(retry {:keys [retry-count] :as message-payload})
source

retry-for-channelclj

(retry-for-channel {:keys [retry-count topic-entity] :as message-payload}
                   channel)
source

return-to-poolclj

(return-to-pool pool ch)
source

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

× close