TsgcWSPClient_STOMP_ActiveMQ › Methods › SubscribeEx
Subscribes to an arbitrary STOMP destination using a full ActiveMQ header collection.
procedure SubscribeEx(const aDestination: String; const aDurable: Boolean = True; const aExclusive: Boolean = False; const aACK: TsgcSTOMPACK = ackAuto; const aOptions: TsgcWSActiveMQSTOMP_Queue_Options = nil);
| Name | Type | Description |
|---|---|---|
aDestination | const String | Fully-qualified ActiveMQ destination written as-is to the destination header (for example /topic/prices, /queue/orders or a composite destination). |
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 destination 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. |
Low-level subscribe that does not apply any prefix to aDestination and accepts the full ActiveMQ header collection via aOptions. Use this when the destination is already formatted (for example composite destinations, virtual topics or advisory channels) or when SubscribeTopic/SubscribeQueue are not flexible enough.
oActiveMQ.SubscribeEx('/topic/VirtualTopic.orders');