TsgcWSPClient_AMQP › Methods › RejectMessage
Rejects a delivered message (basic.reject), optionally returning it to the queue.
procedure RejectMessage(const aChannel: string; aDeliveryTag: UInt64; aRequeue: Boolean = false);
| Name | Type | Description |
|---|---|---|
aChannel | const string | Name of the open AMQP channel on which the operation is issued. |
aDeliveryTag | UInt64 | Server-assigned delivery tag identifying the message (received via OnAMQPBasicDeliver). |
aRequeue | Boolean | When True the broker puts the message/messages back on the queue; when False they are discarded or dead-lettered. |
Use RejectMessage when the consumer cannot process the delivery. Rejecting with aRequeue set to False is the standard way to route a message to a dead-letter exchange configured on the queue.
sgcWSPClient_AMQP1.RejectMessage('ch1', vDeliveryTag, True);