kithara.rabbitmq.message

ack

(ack {:keys [channel delivery-tag]})

ACK the given message.

ack-multiple

(ack-multiple {:keys [channel delivery-tag]})

ACK the given message (or multiple ones).

build

(build channel envelope properties body & [{:keys [as], :or {as :bytes}}])

Generate the message map based on the given data/options. The map will contain the following keys:

  • :channel: the channel the message was received on,
  • :exchange: the exchange the message was published to,
  • :routing-key: the message’s routing key,
  • :body: the coerced body,
  • :body-raw: the body as a byte array,
  • :properties: a map of message properties,
  • :redelivered?: whether the message was redelivered,
  • :delivery-tag: the message’s delivery tag.

The resulting map can be passed as-is to ACK/NACK/REJECT functions.

nack

(nack {:keys [channel delivery-tag requeue?], :or {requeue? true}})

NACK the given message, requeueing if desired.

nack-multiple

(nack-multiple {:keys [channel delivery-tag requeue?], :or {requeue? true}})

NACK the given message (or multiple ones), requeueing if desired.

reject

(reject {:keys [channel delivery-tag requeue?], :or {requeue? false}})

REJECT the given message, requeing if desired.