TsgcWSPClient_AMQPMethods › DeclareQueue

DeclareQueue Method

Declares a queue on the broker (queue.declare).

Syntax

procedure DeclareQueue(const aChannel, aQueue: string; aPassive: Boolean = false; aDurable: Boolean = false; aExclusive: Boolean = false; aAutoDelete: Boolean = false; aNoWait: Boolean = false; const aArguments: string = '');

Parameters

NameTypeDescription
aChannelconst stringName of the open AMQP channel on which the operation is issued.
aQueueconst stringName of the queue.
aPassiveBooleanWhen True the broker checks whether the object exists and raises an error if it does not, without creating it.
aDurableBooleanWhen True the object survives broker restarts.
aExclusiveBooleanWhen True the queue is restricted to the declaring connection and deleted on disconnect.
aAutoDeleteBooleanWhen True the object is deleted once the last client stops using it.
aNoWaitBooleanWhen True the client does not wait for the broker to confirm the operation.
aArgumentsconst stringOptional JSON-encoded field-table with additional arguments.

Remarks

Creates the queue if it does not exist, or validates its properties if it does. Combine aDurable/aExclusive/aAutoDelete to model transient, exclusive or persistent queues.

Example

sgcWSPClient_AMQP1.DeclareQueue('ch1', 'orders', False, True, False, False);

Back to Methods