Skip to content

Forwarder

Advanced → Forwarder defines message-routing rules that bridge MQTT topics between two brokers. Each rule subscribes to a topic on a Source Broker and republishes every message it receives to a Target Broker.

Forwarder rules page

How It Works

Source Broker  ──(subscribe topic)──▶  Forwarder Rule  ──(publish)──▶  Target Broker

A forwarder rule does not transform the message by default — it forwards the payload as-is. Optionally enable Custom Script to apply a JavaScript transformation before the message is republished.

Column Reference

ColumnMeaning
IDForwarder record ID
NameRule name, e.g. receive, trans-inner
EnabledGreen On = rule is active and forwarding; grey = suspended
Custom ScriptGreen On = a transformation script is applied before republishing
SourceBrokerThe broker this rule subscribes to (topic source)
TargetBrokerThe broker this rule publishes to (message destination)
OperationDetails — view and edit the rule

Configuration Fields (Add / Edit Dialog)

FieldDescription
NameLabel for this forwarding rule
EnabledToggle to activate or suspend without deleting
Source BrokerSelect from brokers defined in Broker
Target BrokerSelect from brokers defined in Broker
Subscription TopicThe MQTT topic pattern to subscribe to on the Source Broker (supports + and # wildcards)
Custom ScriptEnable to write a JS script that transforms the payload before it is published to the Target Broker
NotesFree-text remarks

Typical Use Cases

  • Internal bridging — forward device uplinks from the AS broker to an internal service broker for further processing (trans-inner)
  • External push — forward selected topics to a customer's own MQTT broker or cloud platform
  • Protocol translation — enable Custom Script to reformat payloads (e.g. rename fields, convert units) before republishing
  • Defining broker connections → Broker
  • Built-in MQTT forwarding to external brokers → MQTT Forwarder

System Platform Forwarders

The System Platform can create public forwarder configurations. Public configurations are visible to all organizations. Tenant-side users can view them but cannot edit them. If a system admin creates a forwarder for a specific organization, that forwarder runs with that organization's brokers and organization parameters.

When the organization is empty or PUBLIC, Source Broker and Target Broker are cleared and the record is saved as public configuration. Select a specific organization before choosing its brokers.

Subscription Topic Placeholders

Subscription Topic supports organization-parameter placeholders. ThinkLink reads values from params.org_params and renders the actual subscribed topic. Example:

text
/${tenant}/device/${project}/up

After saving, the forwarder cache stores the rendered topic and subscribes with that topic.

Custom Script Arguments

The custom script entry point is:

javascript
function forwardScript({ topic, msg, org_params }) {
  return msg
}

org_params is read-only and is intended for tenant-level dynamic parameters in forwarding logic.

Version Restore

Each forwarder save creates a version snapshot. Fill in a commit note before editing so later versions can be reviewed or restored.