Skip to content

Commit

Permalink
Clarify documentation for :on_success and :on_failure (#73)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanl committed Sep 24, 2020
1 parent 7ab5958 commit cd03338
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions lib/broadway_rabbitmq/producer.ex
Expand Up @@ -177,16 +177,22 @@ defmodule BroadwayRabbitMQ.Producer do
* `:ack` - acknowledge the message. RabbitMQ will mark the message as acked and
will not redeliver it to any other consumer.
* `:reject` - rejects the message without requeuing (basically, discards the message).
RabbitMQ will not redeliver the message to any other consumer.
* `:reject` - rejects the message without requeuing (basically, discards
the message). RabbitMQ will not redeliver the message to any other
consumer, but a queue can be configured to send rejected messages to a
[dead letter exchange](https://www.rabbitmq.com/dlx.html), where another
consumer can see why it was dead lettered, how many times, etc, and
potentially republish it.
* `:reject_and_requeue` - rejects the message and tells RabbitMQ to requeue it so
that it can be delivered to a consumer again. `:reject_and_requeue` always
requeues the message.
that it can be delivered to a consumer again. `:reject_and_requeue`
always requeues the message. If the message is unprocessable, this will
cause an infinite loop of retries.
* `:reject_and_requeue_once` - rejects the message and tells RabbitMQ to requeue it
the first time. If a message was already requeued and redelivered, it will be
rejected and not requeued again.
rejected and not requeued again. This feature uses Broadway-specific message metadata,
not RabbitMQ's dead lettering feature.
## Metadata
Expand Down

0 comments on commit cd03338

Please sign in to comment.