TsgcWSPClient_STOMP_ActiveMQ › Methods › PublishEx
Sends a message to an arbitrary STOMP destination using a full ActiveMQ header collection.
procedure PublishEx(const aDestination, aText: String; const aContentType: String = CS_TEXT_PLAIN; const aTransaction: String = ''; const aOptions: TsgcWSActiveMQSTOMP_Message_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). |
aText | const String | Message body written verbatim to the SEND frame. |
aContentType | const String | Value of the content-type header; defaults to text/plain. Use application/json, application/octet-stream, etc. for other payloads. |
aTransaction | const String | Optional transaction id previously opened with BeginTransaction; when set the SEND is buffered on the broker until CommitTransaction. |
aOptions | const TsgcWSActiveMQSTOMP_Message_Options | Optional JMS/ActiveMQ message headers (CorrelationId, Expires, JMSXGroupID, Persistent, Priority, ReplyTo and custom entries) added to the SEND frame. |
Low-level publish that does not apply any prefix to aDestination and accepts the full ActiveMQ message options via aOptions. Use this when the destination is already formatted (for example composite destinations, virtual topics or advisory channels) or when the richer JMS header semantics of TsgcWSActiveMQSTOMP_Message_Options are required.
oActiveMQ.PublishEx('/queue/orders', '{"id":42}', 'application/json');