TsgcWSPClient_STOMP_RabbitMQ › Methods › PublishEx
Low-level SEND to a full RabbitMQ destination string supplied by the caller.
procedure PublishEx(const aDestination, aText: String; const aContentType: String = CS_TEXT_PLAIN; const aTransaction: String = ''; const aHeaders: TStrings = nil);
| Name | Type | Description |
|---|---|---|
aDestination | const String | Raw RabbitMQ STOMP destination, e.g. /topic/prices, /queue/orders, /amq/queue/legacy or /exchange/amq.topic/stock.eur. |
aText | const String | Message body to publish. |
aContentType | const String | MIME content-type sent as the content-type header. Defaults to text/plain. |
aTransaction | const String | Optional transaction identifier. When supplied, the SEND frame is buffered under the named transaction and only delivered on commit. |
aHeaders | const TStrings | Optional application headers appended to the SEND frame; each item must be formatted as name:value. |
PublishEx is the raw counterpart of the prefix-specific helpers. Use it when the destination string is computed dynamically or points at a non-standard RabbitMQ endpoint. The component does not prepend any prefix.
sgcRabbitMQ.PublishEx('/exchange/logs/info', 'service-started', 'text/plain');