TsgcWSPClient_STOMP_ActiveMQMethods › SubscribeEx

SubscribeEx Method

Subscribes to an arbitrary STOMP destination using a full ActiveMQ header collection.

Syntax

procedure SubscribeEx(const aDestination: String; const aDurable: Boolean = True; const aExclusive: Boolean = False; const aACK: TsgcSTOMPACK = ackAuto; const aOptions: TsgcWSActiveMQSTOMP_Queue_Options = nil);

Parameters

NameTypeDescription
aDestinationconst StringFully-qualified ActiveMQ destination written as-is to the destination header (for example /topic/prices, /queue/orders or a composite destination).
aDurableconst BooleanWhen True the subscription is registered as durable so ActiveMQ retains messages while the client is offline; requires a stable client-id.
aExclusiveconst BooleanWhen True requests an ActiveMQ exclusive consumer so only this client receives messages from the destination at a time.
aACKconst TsgcSTOMPACKAcknowledgement mode (ackAuto, ackClient or ackClientIndividual) used on the SUBSCRIBE frame; governs when ACK/NACK must be issued.
aOptionsconst TsgcWSActiveMQSTOMP_Queue_OptionsOptional ActiveMQ header collection (selector, prefetch-size, retroactive and custom headers) added to the SUBSCRIBE frame.

Remarks

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.

Example

oActiveMQ.SubscribeEx('/topic/VirtualTopic.orders');

Back to Methods