TsgcWSPClient_STOMP_ActiveMQ › Methods › SubscribeQueue
Subscribes to an ActiveMQ queue, prefixing the destination with /queue/.
procedure SubscribeQueue(const aQueue: String; const aDurable: Boolean = True; const aExclusive: Boolean = False; const aACK: TsgcSTOMPACK = ackAuto; const aOptions: TsgcWSActiveMQSTOMP_Queue_Options = nil);
| Name | Type | Description |
|---|---|---|
aQueue | const String | Queue name without the /queue/ prefix; the component prepends it before sending the SUBSCRIBE frame. |
aDurable | const Boolean | When True the subscription is registered as durable so ActiveMQ retains messages while the client is offline; requires a stable client-id. |
aExclusive | const Boolean | When True requests an ActiveMQ exclusive consumer so only this client receives messages from the queue at a time. |
aACK | const TsgcSTOMPACK | Acknowledgement mode (ackAuto, ackClient or ackClientIndividual) used on the SUBSCRIBE frame; governs when ACK/NACK must be issued. |
aOptions | const TsgcWSActiveMQSTOMP_Queue_Options | Optional ActiveMQ header collection (selector, prefetch-size, retroactive and custom headers) added to the SUBSCRIBE frame. |
Helper over SubscribeEx that targets an ActiveMQ queue: the destination header is built as /queue/ + aQueue. Queue semantics mean each message is delivered to a single consumer, so competing-consumer patterns are supported by subscribing multiple clients to the same queue. Use UnSubscribeQueue to cancel the subscription with the same queue name.
oActiveMQ.SubscribeQueue('orders');