Updated on 2022-08-11 GMT+08:00

Custom Topics

IEF allows you to customize topics based on actual requirements.

To use a custom topic, create a message route in which a topic is defined on the IEF console. IEF will forward the data in the topic based on the message route. For details on how to create a message route, see Edge-Cloud Message Overview.

Topic

{project_id}/nodes/{node_id}/user/{custom_topic}

Usage

Use an MQTT client to publish this topic.

Parameter Description

IEF can transparently forward any content in a custom topic.

{custom_topic} supports the wildcards # and +. Therefore, multiple messages that meet a wildcard rule can be forwarded in a unified manner.

# is a wildcard that matches any number (0 or greater) of levels in a topic. + is a wildcard that matches only one level in a topic.

IEF performs the minimum match on the topic messages that match the wildcard rule and then forwards the messages. For example, you can configure 123/+/567 as a wildcard rule for message topics 123/aaa/567 and 123/bbb/567.

Example

After a route is created, you can publish messages (data) to the custom topic defined in the route. IEF then forwards the messages to the specified endpoint. IEF also records the number of forwarded messages, including successful and failed messages.

Figure 1 Number of forwarded messages