TsgcWSPClient_STOMP_RabbitMQMethods › SubscribeTemporaryQueue

SubscribeTemporaryQueue Method

Subscribes to a unique private reply-queue using the /temp-queue/name prefix.

Syntax

procedure SubscribeTemporaryQueue(const aQueue, aReplyTo: String; const aDurable: Boolean = True; const aAutoDelete: Boolean = False; const aExclusive: Boolean = False; const aACK: TsgcSTOMPACK = ackAuto; const aOptions: TsgcWSRabbitMQSTOMP_Queue_Options = nil);

Parameters

NameTypeDescription
aQueueconst StringLogical identifier of the temporary queue (without the /temp-queue/ prefix). The component builds the destination as /temp-queue/aQueue; RabbitMQ maps it to an exclusive, auto-delete queue unique to this connection.
aReplyToconst StringReserved for API symmetry with PublishTemporaryQueue. Currently not forwarded on SUBSCRIBE; pass an empty string if not used.
aDurableconst BooleanInformational flag forwarded as a header; temporary queues are always non-durable.
aAutoDeleteconst BooleanInformational flag forwarded as a header; temporary queues are always auto-delete.
aExclusiveconst BooleanInformational flag forwarded as a header; temporary queues are always exclusive to the current connection.
aACKconst TsgcSTOMPACKAcknowledgement mode: ackAuto, ackClient or ackClient-Individual.
aOptionsconst TsgcWSRabbitMQSTOMP_Queue_OptionsOptional RabbitMQ x-arguments. When nil the component Queue property is used.

Remarks

Temporary queues implement the request-response / private-reply pattern: the client creates a queue that is unique to its session and uses it as the reply-to destination when publishing requests through PublishTemporaryQueue. The queue is automatically deleted when the connection closes.

Example

sgcRabbitMQ.SubscribeTemporaryQueue('replies', '');

Back to Methods