IPWorks IoT 2020 Delphi Edition

Questions / Feedback?

Recover Method

Request that the server redeliver all messages on a given channel that have not been acknowledged.

procedure Recover(ChannelName: String; Requeue: Boolean);

Remarks

This method is used to request that the server redeliver all messages that it previously sent to the component on the channel specified by ChannelName which are still awaiting acknowledgement.

A call to this method may cause the server to redeliver zero or more messages over the channel specified by ChannelName. Those messages will cause the MessageIn event to fire with its Redelivered event parameter set to True.

The Requeue parameter controls how the server should attempt to redeliver the messages awaiting acknowledgement. If set to True, the server will simple put the messages back on their original queues, and they will be delivered like any other queued messages (potentially to other consumers). If set to False, the server will redeliver the messages to the component directly.

An exception is thrown if no channel with the given ChannelName exists, or (for RabbitMQ only) if the server returns an error because Requeue was False. (RabbitMQ only supports setting Requeue to True.)

Note that in AMQP, server errors are grouped into "connection errors" and "channel errors", and both are fatal. That is, if the server returns a channel error, it will then close the channel which caused the error; and if it returns a connection error, it will then close the connection. The AMQPClassic component's Error Codes page includes AMQP's various connection and channel errors.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 Delphi Edition - Version 20.0 [Build 8265]