TsgcWSPClient_STOMP_RabbitMQMethods › SubscribeEx

SubscribeEx Method

Low-level SUBSCRIBE with a full RabbitMQ destination string supplied by the caller.

Syntax

procedure SubscribeEx(const aDestination: 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
aDestinationconst StringRaw RabbitMQ STOMP destination, e.g. /topic/prices, /queue/orders, /amq/queue/legacy, /temp-queue/reply or /exchange/amq.topic/stock.*.
aDurableconst BooleanIf True (default), declares a durable subscription queue that survives a broker restart.
aAutoDeleteconst BooleanIf True, the subscription queue is deleted automatically when the last consumer disconnects.
aExclusiveconst BooleanIf True, the subscription queue is restricted to the current connection and deleted on disconnect.
aACKconst TsgcSTOMPACKAcknowledgement mode: ackAuto, ackClient or ackClient-Individual.
aOptionsconst TsgcWSRabbitMQSTOMP_Queue_OptionsOptional RabbitMQ x-arguments. When nil the component Queue property is used.

Remarks

SubscribeEx bypasses the prefix helpers and sends the destination exactly as provided, which is useful for custom RabbitMQ destinations (for example pre-built exchange bindings or vhost-scoped names). Prefer the prefix-specific helpers for standard cases.

Example

sgcRabbitMQ.SubscribeEx('/exchange/logs/error.*', True, False, False, ackClient);

Back to Methods