Marshalling Messages from MQTT to FTL

MQTT Payload

By default, the bridge encodes the MQTT payload into an opaque FTL field whose name is specified by the ftl_payload_field configuration file option.

Marshalling the MQTT Payload as JSON

If the mqtt_marshal_as_json option is set to true, TIBCO FTL-MQTT Bridge assumes that the incoming MQTT payload is a JSON string and converts directly to an FTL message.

Any message that cannot be converted is ignored.

Note: If the mqtt_marshal_as_json option is set to true, the ftl_payload_field configuration file option is ignored.

MQTT Topics

The MQTT topic is always encoded into an FTL message field whose fieldname is specified by the ftl_payload_field configuration file option.

Split Topic

If the split_topic option is set to true, the TIBCO FTL-MQTT Bridge also encodes the MQTT topic elements into fields to allow client side matchers to operate on the MQTT topic.

Rule for splitting topics into FTL fields
  • The topic is split on the element separator "/", with the resulting N tokens assigned to N separate fields. The fields are named _mqtt_sub_1, to _mqtt_sub_<N>.

    If the topic starts with "/"the value of _mqtt_sub_1 will be an empty string ,for example, /foo would be split into _mqtt_sub_1="", and _mqtt_sub_2="foo".

  • Wild-cards # and + are not supported.
Note: FTL does not support the MQTT retained and QoS options. MQTT retained and QoS values are not presented to FTL clients.

For more information on the configuration options, see TIBCO FTL-MQTT Bridge Configuration Reference.