TsgcWSPClient_AMQPMethods › RejectMessage

RejectMessage Method

Rejects a delivered message (basic.reject), optionally returning it to the queue.

Syntax

procedure RejectMessage(const aChannel: string; aDeliveryTag: UInt64; aRequeue: Boolean = false);

Parameters

NameTypeDescription
aChannelconst stringName of the open AMQP channel on which the operation is issued.
aDeliveryTagUInt64Server-assigned delivery tag identifying the message (received via OnAMQPBasicDeliver).
aRequeueBooleanWhen True the broker puts the message/messages back on the queue; when False they are discarded or dead-lettered.

Remarks

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.

Example

sgcWSPClient_AMQP1.RejectMessage('ch1', vDeliveryTag, True);

Back to Methods