MQTT Publish Activity

The MQTT Publish activity publishes a message to a broker, which supports and exposes the MQTT protocol.

Settings

The Settings tab has the following fields:

Field Description
Connection Name of the connection
Topic The topic where the message is published
Retain You must enable this field to retain the last message for new subscribers
QoS The quality of service is set to 0, 1, or 2
  • 0 - message is delivered at most once
  • 1 - message is delivered at least once
  • 2 - message is delivered exactly once
Value Deserializer Establish the way the message body is treated
Value Deserializer:String The activity input accepts a simple string. The string is sent as an array of bytes to the server.
Value Deserializer:JSON An Input Settings field is enabled where the application designer can enter a JSON object. That object is presented on the input schema for mapping and at run time the object is deserialized and sent as bytes. A subscriber can use the same JSON object definition to deserialize the message.
Value Deserializer:Base64 The activity accepts string data which is base64 decoded into a byte array before being sent to the broker. If a previous activity presents a byte array on its output, it is safe to map that value here.

Input Settings

The Input Settings tab is visible if the deserializer is set to JSON on the Settings tab. An example of a JSON object is entered in this field which can be used to compose the input schema.

The Input Settings tab has the following field:

Field Description
Schema for JSON value Enter a JSON object representation to be used on the Input tab.

Sample JSON query:

{

"fname":"Sam",

"lname":"Patricks",

"age":37,

"employed":true

}

Input

The Input tab has the following field:

Field Description
Input Map the string, byte array, or JSON object.

Loop

Refer to the section on "Using the Loop Feature in an Activity" in the TIBCO Cloud™ Integration - Flogo® (PAYG) User's Guide for information on the Loop tab.