TsgcWSPClient_STOMP_RabbitMQ › Methods › SubscribeTemporaryQueue
Subscribes to a unique private reply-queue using the /temp-queue/name prefix.
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);
| Name | Type | Description |
|---|---|---|
aQueue | const String | Logical 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. |
aReplyTo | const String | Reserved for API symmetry with PublishTemporaryQueue. Currently not forwarded on SUBSCRIBE; pass an empty string if not used. |
aDurable | const Boolean | Informational flag forwarded as a header; temporary queues are always non-durable. |
aAutoDelete | const Boolean | Informational flag forwarded as a header; temporary queues are always auto-delete. |
aExclusive | const Boolean | Informational flag forwarded as a header; temporary queues are always exclusive to the current connection. |
aACK | const TsgcSTOMPACK | Acknowledgement mode: ackAuto, ackClient or ackClient-Individual. |
aOptions | const TsgcWSRabbitMQSTOMP_Queue_Options | Optional RabbitMQ x-arguments. When nil the component Queue property is used. |
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.
sgcRabbitMQ.SubscribeTemporaryQueue('replies', '');