IPWorks IoT 2020 JavaScript Edition

Questions / Feedback?

Message Property

The message to send.

Syntax


 getMessage(): AMQPCMessage;

 setMessage(message: AMQPCMessage): void;

Default Value

Remarks

This property holds an amqpcmessage object whose fields are used to construct a message to send when PublishMessage is called.

Refer to PublishMessage for more information.

Publishing a Message

amqpc1.Message.Body = "Hello, world!";

// Publish a message to the server's default (no-name) exchange, using the name of a specific queue as the routing key.
amqpc1.PublishMessage("channel", "", "MyQueue", false, false);

// Publish a message to the "MyExchange" exchange, using the routing key "MyRoutingKey".
amqpc1.PublishMessage("channel", "MyExchange", "MyRoutingKey", false, false);

This property is not available at design time.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks IoT 2020 JavaScript Edition - Version 20.0 [Build 8265]