Skip to content

qie.spawnNewMessage

Signature: qie.spawnNewMessage(message)

Returns: void

Spawns a new message and adds it to the queue for the next node(s). The spawned message will not be processed in the current node.

Note

message.discard() is often used in conjunction with this function.

Note

This function should only be used in scripts where the message object is available.

Parameters

Type Name Description Default
Message message the message to add to the queue for the next node(s)

Example

/* You can only spawn the type of message that the source node is configured to accept */
// JSON example
var newJsonMessage = qie.parseJSONString('{"existence":"starting next node until the end."}'); // JSON Message
qie.spawnNewMessage(newJsonMessage);