W3cubDocs

/Symfony 4.1

RejectMessageExceptionInterface

interface RejectMessageExceptionInterface implements Throwable

If something goes wrong while consuming and handling a message from the AMQP broker, there are two choices: rejecting or re-queuing the message.

If the exception that is thrown by the bus while dispatching the message implements this interface, the message will be rejected. Otherwise, it will be re-queued.