createMessage
createMessage(forPUT: Boolean): JadeGenericMessage;
The createMessage method of the JadeGenericQueue class returns a JadeGenericMessage object that can be used for working with a message that is added to or retrieved from a queue. If the value of the forPUT parameter is true, the message object is initialized for constructing a message to be added to a queue. If the value of the forPUT parameter is false, the message object is initialized for retrieving a message from a queue.
The following example shows the use of the createMessage method to retrieve a message.
vars factory : JadeMessagingFactory; msg : JadeGenericMessage; queue : JadeGenericQueue; begin create factory transient; queue := factory.openQueue("JadeMQ://localnode/TestQ", "Usage=All"); msg := queue.createMessage(false); queue.getMessage(msg, null); write msg.body.String; epilog delete factory; delete msg; delete queue; end;