MQTT Consumer


This Snap was not developed by the SnapLogic product team. As such, this documentation may not exactly match your version of this Snap and is provided strictly as a reference.


Snap type:

Read


Description:

This Snap is used for subscribing to one or more MQTT message brokers, subscribing to and consuming messages from one or more topics.


Prerequisites:

[None]


Support and limitations:

Works in Ultra Task Pipelines.

Account: 

This Snap uses account references created on the Accounts page of SnapLogic Manager to handle access to this endpoint. See MQTT Account for information on setting up this type of account.

Views:
InputThis Snap has no input view.
Output

This Snap has exactly one binary output view. For routing, filtering or other logic, the following metadata is available in addition to the binary output: 

Preview BinaryAllows you to preview the payload of a message.
topicThe topic to which this message was published.
qosThe quality of service for this message.
isDuplicateWhether or not this message might be a duplicate of one which has already been received.
isRetainedWhether or not this message was retained by the server.

This Snap offers a binary output, which means that you may need to use a JSON, CSV or other parser to work with received messages.

ErrorThis Snap has at most one binary error view.

Settings

Label


Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Topic Filter



Required. One or more topic filters. The "topic filter" string used when subscribing may contain special characters, which allow you to subscribe to multiple topics at once. 

The topic level separator is used to introduce structure into the topic, and can therefore be specified within the topic for that purpose. The multi-level wildcard and single-level wildcard can be used for subscriptions, but they cannot be used within a topic by the publisher of a message. 

Topic level separator
The forward slash (/) is used to separate each level within a topic tree and provide a hierarchical structure to the topic space. The use of the topic level separator is significant when the two wildcard characters are encountered in topics specified by subscribers. 

Multi-level wildcard
The number sign (#) is a wildcard character that matches any number of levels within a topic. For example, if you subscribe to finance/stock/ibm/#, you receive messages on these topics:

  finance/stock/ibm
  finance/stock/ibm/closingprice
  finance/stock/ibm/currentprice

The multi-level wildcard can represent zero or more levels. Therefore, finance/# can also match the singular finance, where # represents zero levels. The topic level separator is meaningless in this context, because there are no levels to separate. 

The multi-level wildcard can be specified only on its own or next to the topic level separator character. Therefore, # and finance/# are both valid, but finance# is not valid. The multi-level wildcard must be the last character used within the topic tree. For example, finance/# is valid but finance/#/closingprice is not valid. 

Single-level wildcard
The plus sign (+) is a wildcard character that matches only one topic level. For example, finance/stock/+ matches finance/stock/ibm and finance/stock/xyz, but not finance/stock/ibm/closingprice. Also, because the single-level wildcard matches only a single level, finance/+ does not match finance.
Use the single-level wildcard at any level in the topic tree, and in conjunction with the multilevel wildcard. Specify the single-level wildcard next to the topic level separator, except when it is specified on its own. Therefore, + and finance/+ are both valid, but finance+ is not valid. The single-level wildcard can be used at the end of the topic tree or within the topic tree. For example, finance/+ and finance/+/ibm are both valid.

Default value: [None]


Max QoS


Required. The maximum quality of service to subscribe each topic at. Messages published at a lower quality of service will be received at the published QoS. Messages published at a higher quality of service will be received using the QoS specified on the subscribe. 

Suggest seconds


Required. Number of seconds to listen for messages during preview mode at design time. Please note that the platform imposes a time limit of 180? seconds during pipeline validation which will take precedence if you enter a number of seconds greater than that limit. 

Execute seconds


Required. Number of seconds to listen for messages when your pipeline is executed. Enter 0 to listen until the pipeline is stopped.

Snap Execution

Select one of the three modes in which the Snap executes. Available options are:

  • Validate & Execute: Performs limited execution of the Snap, and generates a data preview during Pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only: Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.