TsgcWSPClient_STOMP_RabbitMQMethods › PublishQueueOutside

PublishQueueOutside Method

Publishes a message to an externally declared queue using the /amq/queue/name prefix.

Syntax

procedure PublishQueueOutside(const aQueue, aText: String; const aContentType: String = CS_TEXT_PLAIN; const aTransaction: String = ''; const aHeaders: TStrings = nil);

Parameters

NameTypeDescription
aQueueconst StringName of an existing AMQP queue declared outside the STOMP gateway. The component builds the destination as /amq/queue/aQueue.
aTextconst StringMessage body to publish.
aContentTypeconst StringMIME content-type sent as the content-type header. Defaults to text/plain.
aTransactionconst StringOptional transaction identifier. When supplied, the SEND frame is buffered under the named transaction and only delivered on commit.
aHeadersconst TStringsOptional application headers appended to the SEND frame; each item must be formatted as name:value.

Remarks

Use this method to deliver messages to a queue that was declared through AMQP, the management UI or a policy. The queue must already exist; the STOMP gateway does not declare it on publish.

Example

sgcRabbitMQ.PublishQueueOutside('legacy.orders', 'order-42');

Back to Methods