(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.
(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.
(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.
(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.
(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.
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}}}}}
(publish-to-channel-dead-queue channel message-payload)
(publish-to-channel-dead-queue channel
message-payload
topic-entity
is-payload-serialized?)
(publish-to-dead-queue message-payload)
(publish-to-dead-queue message-payload topic-entity is-payload-serialized?)
(retry-for-channel {:keys [retry-count topic-entity] :as message-payload}
channel)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close