The payload can be set by direct assignment to the
| Method | Description |
|---|---|
|
|
Adds the specified binary information to the end of the message body |
|
|
Adds the specified text to the end of the message body |
|
|
Encodes the specified text as UTF8 and adds to the end of the message body |
|
|
Adds the specified UTF8 text to the end of the message body |
Before content is added, the message object must be initialized for sending. Do this by calling the
The following code fragment shows a message being constructed from a text string.
// initialize the message
message := queue.createMessage(true);
// describe the type of data in the payload
message.format := "text/UTF8";
// build message payload
message.appendStringAsUtf8("Hello World");
message.appendStringAsUtf8("Glad to be here");
// insert message in queue
queue.putMessage(message, "");
When the message is retrieved, the
if message.format = "text/UTF8" then
// str := message.body.String;
str := message.getUtf8bodyAsString;
endif;