---
schema_version: "1"
id: cc2f7b7b7d775ccb53659db901327cfa78a8a578c74d3179cb76c2c77a53deea
title: MQTT Connector 1.1 Reference
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mqtt3-connector/latest/mqtt3-connector-reference.md
canonical_url: https://docs.mulesoft.com/mqtt3-connector/latest/mqtt3-connector-reference
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 6a63074e857660084c0d5e4623e9d20d02d8555880cce182d77d47a63e78d4d3
description: MuleSoft Documentation Site
release: "1.1"
latest: true
---
---
product: MQTT Connector
version: 1.1
is-latest-version: true
---

# MQTT Connector 1.1 Reference

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Anypoint Connector for MQTT (MQTT Connector) is an MQTT (Message Queuing Telemetry Transport) v3.x
protocol-compliant MuleSoft extension. MQTT is a lightweight publish/subscribe messaging protocol
designed for connecting remote devices with a small code footprint and minimal network bandwidth.
MQTT today is used in a wide variety of industries, such as automotive, manufacturing,
telecommunications, and oil and gas.

The connector consumes and produces MQTT messages and supports all MQTT v3.x functionalities
including message retention, LWT(LWT) messages, and persistent sessions.

## Configurations

---

### Config

Default configuration.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Name</p></td><td><p>String</p></td><td><p>The name for this configuration. Connectors reference the configuration with this name.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Connection</p></td><td><div><div><ul><li><p><a href="#Config_Connection">MQTT 3 URL Connection</a></p></li><li><p><a href="#Config_FailOver">MQTT 3 Fail-Over Connection</a></p></li><li><p><a href="#ConfigForm">MQTT 3 Form Connection</a></p></li></ul></div></div></td><td><p>Connection types for this configuration.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Name</p></td><td><div><div><p>String</p></div></div></td><td><p>The identifier of this element used to reference it in other components</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Expiration Policy</p></td><td><div><div><p><a href="#ExpirationPolicy">Expiration Policy</a></p></div></div></td><td><p>Configures an expiration policy for the configuration.</p></td><td></td><td></td></tr></tbody></table>

#### Connection Types

##### MQTT 3 URL Connection

Cached connection provider that creates MQTT connections. Enables you to specify a connection URL
for the broker.

###### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Client ID Generator</p></td><td><div><div><p>One of:</p></div><div><ul><li><p><a href="#ClientIdRandomSuffixGenerator">Client ID Random Suffix Generator</a></p></li><li><p><a href="#ClientIdCustomExpressionGenerator">Client ID Custom Expression Generator</a></p></li></ul></div></div></td><td><p>A Client ID generator that generates a Client ID to identify a connection to the MQTT broker.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Username</p></td><td><div><div><p>String</p></div></div></td><td><p>Username to authenticate credentials to the MQTT broker.</p></td><td></td><td></td></tr><tr><td><p>Password</p></td><td><div><div><p>String</p></div></div></td><td><p>Password authenticate credentials to the MQTT broker.</p></td><td></td><td></td></tr><tr><td><p>URL</p></td><td><div><div><p>String</p></div></div></td><td><p>URL that represents the broker to connect to.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>TLS Context</p></td><td><div><div><p><a href="#Tls">TLS</a></p></div></div></td><td></td><td></td><td></td></tr><tr><td><p>Topic</p></td><td><div><div><p>String</p></div></div></td><td><p>Topic to publish the LWTmessage.</p></td><td></td><td></td></tr><tr><td><p>Body</p></td><td><div><div><p>String</p></div></div></td><td><p>Content of the LWTmessage.</p></td><td></td><td></td></tr><tr><td><p>QoS</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>AT_MOST_ONCE</p></li><li><p>AT_LEAST_ONCE</p></li><li><p>EXACTLY_ONCE</p></li></ul></div></div></td><td><p>Quality of service (QoS) with which the LWTmessage is published. Defaults to AT_LEAST_ONCE.</p></td><td><p>AT_LEAST_ONCE</p></td><td></td></tr><tr><td><p>Is Retained</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, the broker retains the LWTmessage.</p></td><td><p><code>false</code></p></td><td></td></tr><tr><td><p>Connection Timeout</p></td><td><div><div><p>Number</p></div></div></td><td><p>The socket connection timeout value. This attribute works in tandem with <code>timeoutUnit</code>. If multiple fail-over URLs are provided, the timeout applies to each URL individually.</p></td><td><p>30</p></td><td></td></tr><tr><td><p>Timeout Unit</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><p>Unit of time for the <strong>Connection Timeout</strong> field.</p></td><td><p>SECONDS</p></td><td></td></tr><tr><td><p>Keep Alive Interval</p></td><td><div><div><p>Number</p></div></div></td><td><p>The amount of time that the connection between the client and broker is kept alive without any messages exchanged. If the keep-alive interval is 0, then the keep-alive mechanism is disabled.</p></td><td><p>0</p></td><td></td></tr><tr><td><p>Keep Alive Interval Unit</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><p>The unit of time that corresponds to the <code>keepAliveInterval</code> parameter. Defaults to SECONDS</p></td><td><p>SECONDS</p></td><td></td></tr><tr><td><p>Max In Flight</p></td><td><div><div><p>Number</p></div></div></td><td><p>Maximum number of messages that can be unacknowledged at a given time. If you set the parameter to <code>0</code>, there can be unlimited in-flight messages.</p></td><td><p>10</p></td><td></td></tr><tr><td><p>Clean Session</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, the session is cleaned each time the client disconnects from the broker. Subscriptions are not saved and offline (QoS 1 and 2) messages for that client are lost.</p></td><td><p><code>true</code></p></td><td></td></tr><tr><td><p>Enable File Persistence</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, creates a file-based persistent data store, used to store outbound and inbound messages while they are in flight, enabling delivery to the QoS specified.</p></td><td><p><code>false</code></p></td><td></td></tr><tr><td><p>Data Store Path</p></td><td><div><div><p>String</p></div></div></td><td><p>The directory where the file-based persistent data store is created if <code>enableFilePersistence</code> is set to <code>true</code>.</p></td><td></td><td></td></tr><tr><td><p>Reconnection</p></td><td><div><div><p><a href="#Reconnection">Reconnection</a></p></div></div></td><td><p>When the application is deployed, a connectivity test is performed on all connectors. If set to <code>true</code>, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy.</p></td><td></td><td></td></tr></tbody></table>

##### MQTT 3 Fail-Over Connection

###### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Client ID Generator</p></td><td><div><div><p>One of: * <a href="#ClientIdRandomSuffixGenerator">Client ID Random Suffix Generator</a> * <a href="#ClientIdCustomExpressionGenerator">Client ID Custom Expression Generator</a></p></div></div></td><td><p>A ClientIDGenerator that generates a Client ID to identify a connection to the MQTT broker.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Username</p></td><td><div><div><p>String</p></div></div></td><td><p>Username to authenticate credentials to the MQTT broker.</p></td><td></td><td></td></tr><tr><td><p>Password</p></td><td><div><div><p>String</p></div></div></td><td><p>Password to authenticate credentials to the MQTT broker.</p></td><td></td><td></td></tr><tr><td><p>Fail Over Servers</p></td><td><div><div><p>Array of <a href="#FailOverUrl">Fail Over URL</a></p></div></div></td><td><p>The list of server URLs used to establish a connection to the broker.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>TLS Context</p></td><td><div><div><p><a href="#Tls">TLS</a></p></div></div></td><td></td><td></td><td></td></tr><tr><td><p>Topic</p></td><td><div><div><p>String</p></div></div></td><td><p>Topic to publish the LWTmessage.</p></td><td></td><td></td></tr><tr><td><p>Body</p></td><td><div><div><p>String</p></div></div></td><td><p>Content of the LWTmessage.</p></td><td></td><td></td></tr><tr><td><p>QoS</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>AT_MOST_ONCE</p></li><li><p>AT_LEAST_ONCE</p></li><li><p>EXACTLY_ONCE</p></li></ul></div></div></td><td><p>Quality of service (QoS) with which the LWTmessage is published. Defaults to AT_LEAST_ONCE</p></td><td><p>AT_LEAST_ONCE</p></td><td></td></tr><tr><td><p>Is Retained</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, the broker retains the LWTmessage.</p></td><td><p><code>false</code></p></td><td></td></tr><tr><td><p>Connection Timeout</p></td><td><div><div><p>Number</p></div></div></td><td><p>The socket connection timeout value. This attribute works in tandem with <code>timeoutUnit</code>. If multiple fail-over URLs are provided, the timeout applies to each URL individually.</p></td><td><p>30</p></td><td></td></tr><tr><td><p>Timeout Unit</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><p>Unit of time for the <strong>Connection Timeout</strong> field. Defaults to SECONDS</p></td><td><p>SECONDS</p></td><td></td></tr><tr><td><p>Keep Alive Interval</p></td><td><div><div><p>Number</p></div></div></td><td><p>The amount of time that the connection between the client and broker is kept alive without any messages being exchanged. If the keep-alive interval is <code>0</code>, then the keep-alive mechanism is disabled.</p></td><td><p>0</p></td><td></td></tr><tr><td><p>Keep Alive Interval Unit</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><p>The unit of time that corresponds to the <code>keepAliveInterval</code> parameter. Defaults to SECONDS</p></td><td><p>SECONDS</p></td><td></td></tr><tr><td><p>Max In Flight</p></td><td><div><div><p>Number</p></div></div></td><td><p>Maximum number of messages that can be unacknowledged at a given time. If you set the parameter to <code>0</code>, there can be unlimited in-flight messages.</p></td><td><p>10</p></td><td></td></tr><tr><td><p>Clean Session</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, the session is cleaned each time the client disconnects from the broker. Subscriptions are not saved and offline (QoS 1 and 2) messages for that client are lost.</p></td><td><p><code>true</code></p></td><td></td></tr><tr><td><p>Enable File Persistence</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, creates a file-based persistent data store, used to store outbound and inbound messages while they are in flight, enabling delivery to the QoS specified.</p></td><td><p><code>false</code></p></td><td></td></tr><tr><td><p>Data Store Path</p></td><td><div><div><p>String</p></div></div></td><td><p>The directory where the file-based persistent data store is created if <code>enableFilePersistence</code> is set to <code>true</code>.</p></td><td></td><td></td></tr><tr><td><p>Reconnection</p></td><td><div><div><p><a href="#Reconnection">Reconnection</a></p></div></div></td><td><p>When the application is deployed, a connectivity test is performed on all connectors. If set to <code>true</code>, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy.</p></td><td></td><td></td></tr></tbody></table>

##### MQTT 3 Form Connection

Cached connection provider that creates MQTT connections. Enables you to specify a protocol, host,
and port to establish a connection with the broker.

###### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Client ID Generator</p></td><td><div><div><p>One of: * <a href="#ClientIdRandomSuffixGenerator">Client ID Random Suffix Generator</a> * <a href="#ClientIdCustomExpressionGenerator">Client ID Custom Expression Generator</a></p></div></div></td><td><p>A Client ID generator that generates a Client ID to identify a connection to the MQTT broker.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Username</p></td><td><div><div><p>String</p></div></div></td><td><p>Username to authenticate credentials to the MQTT broker.</p></td><td></td><td></td></tr><tr><td><p>Password</p></td><td><div><div><p>String</p></div></div></td><td><p>Password to authenticate credentials to the MQTT broker.</p></td><td></td><td></td></tr><tr><td><p>Protocol</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>TCP</p></li><li><p>WS</p></li><li><p>WSS</p></li><li><p>SSL</p></li><li><p>LOCAL</p></li></ul></div></div></td><td><p>Transport level protocol to use when connecting to the broker.</p></td><td><p>TCP</p></td><td></td></tr><tr><td><p>URL</p></td><td><div><div><p>String</p></div></div></td><td><p>Broker’s host to connect to.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Port</p></td><td><div><div><p>String</p></div></div></td><td><p>Broker’s port to connect to</p></td><td><p>1883</p></td><td></td></tr><tr><td><p>TLS Context</p></td><td><div><div><p><a href="#Tls">TLS</a></p></div></div></td><td></td><td></td><td></td></tr><tr><td><p>Topic</p></td><td><div><div><p>String</p></div></div></td><td><p>Topic to publish the LWTmessage.</p></td><td></td><td></td></tr><tr><td><p>Body</p></td><td><div><div><p>String</p></div></div></td><td><p>Content of the LWTmessage.</p></td><td></td><td></td></tr><tr><td><p>QoS</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>AT_MOST_ONCE</p></li><li><p>AT_LEAST_ONCE</p></li><li><p>EXACTLY_ONCE</p></li></ul></div></div></td><td><p>Quality of service (QoS) with which the LWTmessage is published. Defaults to AT_LEAST_ONCE</p></td><td><p>AT_LEAST_ONCE</p></td><td></td></tr><tr><td><p>Is Retained</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, the broker retains the LWTmessage.</p></td><td><p><code>false</code></p></td><td></td></tr><tr><td><p>Connection Timeout</p></td><td><div><div><p>Number</p></div></div></td><td><p>The socket connection timeout value. This attribute works in tandem with <code>timeoutUnit</code>. If multiple fail-over URLs are provided, the timeout applies to each URL individually.</p></td><td><p>30</p></td><td></td></tr><tr><td><p>Timeout Unit</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><p>Unit of time for the <strong>Connection Timeout</strong> field. Defaults to SECONDS</p></td><td><p>SECONDS</p></td><td></td></tr><tr><td><p>Keep Alive Interval</p></td><td><div><div><p>Number</p></div></div></td><td><p>The amount of time that the connection between the client and broker is kept alive without any messages being exchanged. If the keep-alive interval is <code>0</code>, then the keep-alive mechanism is disabled.</p></td><td><p>0</p></td><td></td></tr><tr><td><p>Keep Alive Interval Unit</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><p>The unit of time that corresponds to the <code>keepAliveInterval</code> parameter.</p></td><td><p>SECONDS</p></td><td></td></tr><tr><td><p>Max In Flight</p></td><td><div><div><p>Number</p></div></div></td><td><p>Maximum number of messages that can be unacknowledged at a given time. If you set the parameter to <code>0</code>, there can be unlimited in-flight messages.</p></td><td><p>10</p></td><td></td></tr><tr><td><p>Clean Session</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, the session is cleaned each time the client disconnects from the broker. Subscriptions are not saved and offline (QoS 1 and 2) messages for that client are lost.</p></td><td><p><code>true</code></p></td><td></td></tr><tr><td><p>Enable File Persistence</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, creates a file-based persistent data store, used to store outbound and inbound messages while they are in flight, enabling delivery to the QoS specified.</p></td><td><p><code>false</code></p></td><td></td></tr><tr><td><p>Data Store Path</p></td><td><div><div><p>String</p></div></div></td><td><p>The directory where the file-based persistent data store is created if <code>enableFilePersistence</code> is set to <code>true</code>.</p></td><td></td><td></td></tr><tr><td><p>Reconnection</p></td><td><div><div><p><a href="#Reconnection">Reconnection</a></p></div></div></td><td><p>When the application is deployed, a connectivity test is performed on all connectors. If set to <code>true</code>, deployment will fail if the test doesn’t pass after exhausting the associated reconnection strategy.</p></td><td></td><td></td></tr></tbody></table>

#### Associated Operations

- [Publish](#Publish)

#### Associated Sources

- [On New Message](#Listener)

## Operations

### Publish

`<mqtt3:publish>`

Operation that enables you to publish a single MQTT 3 message to a given exchange.

### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Configuration</p></td><td><p>String</p></td><td><p>Name of the configuration to use.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Topic</p></td><td><div><div><p>String</p></div></div></td><td><p>Topic in which to publish the message.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Message</p></td><td><div><div><p>Any</p></div></div></td><td><p>Content of the message to publish.</p></td><td><p>#[payload]</p></td><td></td></tr><tr><td><p>QoS</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>AT_MOST_ONCE</p></li><li><p>AT_LEAST_ONCE</p></li><li><p>EXACTLY_ONCE</p></li></ul></div></div></td><td><p>Quality of service (QoS) with which the message is published.</p></td><td><p>AT_LEAST_ONCE</p></td><td></td></tr><tr><td><p>Is Retained</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>Whether the broker retains the message.</p></td><td><p><code>false</code></p></td><td></td></tr><tr><td><p>Config Ref</p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><p>Name of the configuration to execute the component.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Reconnection Strategy</p></td><td><div><div><ul><li><p><a href="#Reconnect">Reconnect</a></p></li><li><p><a href="#ReconnectForever">Reconnect Forever</a></p></li></ul></div></div></td><td><p>A retry strategy in case of connectivity errors.</p></td><td></td><td></td></tr></tbody></table>

### For Configurations

- [Config](#Config)

### Throws

- MQTT3:CONNECTIVITY

  The client became disconnected from the broker while attempting to publish a message.

- MQTT3:INVALID\_CLIENT\_ID

  The client ID is invalid.

- MQTT3:INVALID\_TOPIC

  The topic is invalid because, for example, the name is too short, too long, or contains invalid
  characters.

- MQTT3:PERSISTENCE

  When publishing a message, an error occurred while reading or writing persistent data for reliable
  messaging.

- MQTT3:PUBLISH

  An error occurred while attempting to publish a message.

- MQTT3:RETRY\_EXHAUSTED

  All reconnection attempts failed.

- MQTT3:UNAUTHORIZED

  The client is not authorized to publish a message.

- MQTT3:WRITE\_TIMEOUT

  An error occurred when the client timed out waiting to write messages to the server.

## Sources

### On New Message

`<mqtt3:listener>`

Source that listens for new incoming messages for one or more topic filters. Each topic filter has a
specific QoS configured.

### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Configuration</p></td><td><p>String</p></td><td><p>Name of the configuration to use.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Topics</p></td><td><div><div><p>Array of <a href="#Topic">Topic</a></p></div></div></td><td><p>List of topics that the listener subscribes to. You can configure this field by using either <strong>Edit inline</strong> or <strong>Bean reference</strong>. For source configuration examples, see <a href="https://docs.mulesoft.com/mqtt3-connector/latest/mqtt3-connector-listener">Listen for New Messages with MQTT Connector</a>.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Config Ref</p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><p>Name of the configuration to execute the component.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Primary Node Only</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>Determines whether to execute the source only on the primary node when running Mule instances in a cluster.</p></td><td><p><code>true</code></p></td><td></td></tr><tr><td><p>Redelivery Policy</p></td><td><div><div><p><a href="#RedeliveryPolicy">Redelivery Policy</a></p></div></div></td><td><p>Defines a policy for processing the redelivery of the same message.</p></td><td></td><td></td></tr><tr><td><p>Reconnection Strategy</p></td><td><div><div><ul><li><p><a href="#Reconnect">Reconnect</a></p></li><li><p><a href="#ReconnectForever">Reconnect Forever</a></p></li></ul></div></div></td><td><p>A retry strategy in case of connectivity errors.</p></td><td></td><td></td></tr></tbody></table>

### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p><strong>Type</strong></p></td><td><div><div><p>Any</p></div></div></td></tr><tr><td><p><strong>Attributes Type</strong></p></td><td><div><div><p><a href="#Mqtt3MessageAttributes">MQTT 3 Message Attributes</a></p></div></div></td></tr></tbody></table>

### For Configurations

- [Config](#Config)

## Types

### TLS

Configures TLS to provide secure communications for the Mule app.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Enabled Protocols</p></td><td><div><div><p>String</p></div></div></td><td><p>Comma-separated list of protocols enabled for this context.</p></td><td></td><td></td></tr><tr><td><p>Enabled Cipher Suites</p></td><td><div><div><p>String</p></div></div></td><td><p>Comma-separated list of cipher suites enabled for this context..</p></td><td></td><td></td></tr><tr><td><p>Trust Store</p></td><td><div><div><p><a href="#TrustStore">Trust Store</a></p></div></div></td><td></td><td></td><td></td></tr><tr><td><p>Key Store</p></td><td><div><div><p><a href="#KeyStore">Key Store</a></p></div></div></td><td></td><td></td><td></td></tr><tr><td><p>Revocation Check</p></td><td><div><div><ul><li><p><a href="#StandardRevocationCheck">Standard Revocation Check</a></p></li><li><p><a href="#CustomOcspResponder">Custom OCSP Responder</a></p></li><li><p><a href="#CrlFile">CRL File</a></p></li></ul></div></div></td><td></td><td></td><td></td></tr></tbody></table>

### Trust Store

Configures the truststore for TLS.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Path</p></td><td><div><div><p>String</p></div></div></td><td><p>Path to the truststore. Mule resolves the path relative to the current classpath and file system, if possible.</p></td><td></td><td></td></tr><tr><td><p>Password</p></td><td><div><div><p>String</p></div></div></td><td><p>Password used to protect the trust store.</p></td><td></td><td></td></tr><tr><td><p>Type</p></td><td><div><div><p>String</p></div></div></td><td><p>Type of truststore.</p></td><td></td><td></td></tr><tr><td><p>Algorithm</p></td><td><div><div><p>String</p></div></div></td><td><p>Encryption algorithm that the trust store uses.</p></td><td></td><td></td></tr><tr><td><p>Insecure</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If <code>true</code>, no certificate validations will be performed, rendering connections vulnerable to attacks. Use at your own risk.</p></td><td></td><td></td></tr></tbody></table>

### Key Store

Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a
public certificate.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Path</p></td><td><div><div><p>String</p></div></div></td><td><p>Path to the keystore. Mule resolves the path relative to the current classpath and file system, if possible.</p></td><td></td><td></td></tr><tr><td><p>Type</p></td><td><div><div><p>String</p></div></div></td><td><p>Type of keystore.</p></td><td></td><td></td></tr><tr><td><p>Alias</p></td><td><div><div><p>String</p></div></div></td><td><p>Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.</p></td><td></td><td></td></tr><tr><td><p>Key Password</p></td><td><div><div><p>String</p></div></div></td><td><p>Password used to protect the private key.</p></td><td></td><td></td></tr><tr><td><p>Password</p></td><td><div><div><p>String</p></div></div></td><td><p>Password used to protect the keystore.</p></td><td></td><td></td></tr><tr><td><p>Algorithm</p></td><td><div><div><p>String</p></div></div></td><td><p>Encryption algorithm that the keystore uses.</p></td><td></td><td></td></tr></tbody></table>

### Standard Revocation Check

Configures standard revocation checks for TLS certificates.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Only End Entities</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>Verify the last element of the certificate chain only.</p></td><td></td><td></td></tr><tr><td><p>Prefer Crls</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>Try CRL instead of OCSP first.</p></td><td></td><td></td></tr><tr><td><p>No Fallback</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>Do not use the secondary checking method, which is the method not specified in the Prefer Crls field.</p></td><td></td><td></td></tr><tr><td><p>Soft Fail</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>Avoid verification failure when the revocation server cannot be reached or is busy.</p></td><td></td><td></td></tr></tbody></table>

### Custom OCSP Responder

Configures a custom OCSP responder for certification revocation checks.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Url</p></td><td><div><div><p>String</p></div></div></td><td><p>URL of the OCSP responder.</p></td><td></td><td></td></tr><tr><td><p>Cert Alias</p></td><td><div><div><p>String</p></div></div></td><td><p>Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore.</p></td><td></td><td></td></tr></tbody></table>

### CRL File

Specifies the location of the certification revocation list (CRL) file.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Path</p></td><td><div><div><p>String</p></div></div></td><td><p>Path to the CRL file.</p></td><td></td><td></td></tr></tbody></table>

### Reconnection

Configures a reconnection strategy for an operation.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Fails Deployment</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>When the application is deployed, a connectivity test is performed on all connectors. If set to <code>true</code>, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.</p></td><td></td><td></td></tr><tr><td><p>Reconnection Strategy</p></td><td><div><div><ul><li><p><a href="#Reconnect">Reconnect</a></p></li><li><p><a href="#ReconnectForever">Reconnect Forever</a></p></li></ul></div></div></td><td><p>Reconnection strategy to use.</p></td><td></td><td></td></tr></tbody></table>

### Reconnect

Configures a standard reconnection strategy, which specifies how often to reconnect and how many
reconnection attempts the connector source or operation can make.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Frequency</p></td><td><div><div><p>Number</p></div></div></td><td><p>How often in milliseconds to reconnect.</p></td><td></td><td></td></tr><tr><td><p>Blocking</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If <code>false</code>, the reconnection strategy runs in a separate, non-blocking thread.</p></td><td></td><td></td></tr><tr><td><p>Count</p></td><td><div><div><p>Number</p></div></div></td><td><p>How many reconnection attempts to make.</p></td><td></td><td></td></tr></tbody></table>

### Reconnect Forever

Configures a forever reconnection strategy by which the connector operation source or operation
attempts to reconnect at a specified frequency for as long as the Mule app runs.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Frequency</p></td><td><div><div><p>Number</p></div></div></td><td><p>How often to attempt to reconnect, in milliseconds.</p></td><td></td><td></td></tr><tr><td><p>Blocking</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If <code>false</code>, the reconnection strategy runs in a separate, non-blocking thread.</p></td><td></td><td></td></tr></tbody></table>

### Fail Over URL

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Protocol</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>TCP</p></li><li><p>WS</p></li><li><p>WSS</p></li><li><p>SSL</p></li><li><p>LOCAL</p></li></ul></div></div></td><td><p>Transport level protocol to use when connecting to the broker.</p></td><td><p>TCP</p></td><td></td></tr><tr><td><p>Host</p></td><td><div><div><p>String</p></div></div></td><td><p>Broker’s host to connect to.</p></td><td><p>localhost</p></td><td></td></tr><tr><td><p>Port</p></td><td><div><div><p>String</p></div></div></td><td><p>Broker’s port to connect to.</p></td><td><p>1883</p></td><td></td></tr></tbody></table>

### Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before
Mule considers it eligible for expiration.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Max Idle Time</p></td><td><div><div><p>Number</p></div></div></td><td><p>A scalar time value for the maximum amount of time a dynamic configuration instance should be allowed to be idle before it’s considered eligible for expiration.</p></td><td></td><td></td></tr><tr><td><p>Time Unit</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><p>Time unit for the <strong>Max Idle Time</strong> field.</p></td><td></td><td></td></tr></tbody></table>

### MQTT 3 Message Attributes

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Topic</p></td><td><div><div><p>String</p></div></div></td><td><p>Topic to which the broker directed the message.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Message Id</p></td><td><div><div><p>Number</p></div></div></td><td><p>MQTT ID that identifies a message received from the broker.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>QoS</p></td><td><div><div><p>Number</p></div></div></td><td><p>Quality of service of the message delivered by the broker.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>Is Duplicate</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, the message can duplicate another received message.</p></td><td><p><code>false</code></p></td><td></td></tr><tr><td><p>Is Retained</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If set to <code>true</code>, the message was either sent from a current publisher, or was retained by the server as the last message published on the topic.</p></td><td><p><code>false</code></p></td><td></td></tr></tbody></table>

### Topic

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Topic Filter</p></td><td><div><div><p>String</p></div></div></td><td><p>Topic filter that represents a single or multilevel subscription to a topic.</p></td><td></td><td><p>x</p></td></tr><tr><td><p>QoS</p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>AT_MOST_ONCE</p></li><li><p>AT_LEAST_ONCE</p></li><li><p>EXACTLY_ONCE</p></li></ul></div></div></td><td><p>Quality of service (QoS) with which messages destined to the topic’s <strong>Topic filter</strong> field should be sent by the broker.</p></td><td><p>AT_LEAST_ONCE</p></td><td></td></tr></tbody></table>

### Redelivery Policy

Configures the redelivery policy for executing requests that generate errors. You can add a
redelivery policy to any source in a flow.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Max Redelivery Count</p></td><td><div><div><p>Number</p></div></div></td><td><p>Maximum number of times that a delivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error.</p></td><td></td><td></td></tr><tr><td><p>Message Digest Algorithm</p></td><td><div><div><p>String</p></div></div></td><td><p>Secure hashing algorithm to use if the <strong>Use Secure Hash</strong> field is <code>true</code>. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s <code>hashCode()</code> returned.</p></td><td></td><td></td></tr><tr><td><p>Message Identifier</p></td><td><div><div><p><a href="#RedeliveryPolicyMessageIdentifier">Redelivery Policy Message Identifier</a></p></div></div></td><td><p>Defines which strategy to identify the messages.</p></td><td></td><td></td></tr><tr><td><p>Object Store</p></td><td><div><div><p>ObjectStore</p></div></div></td><td><p>Configures the object store that stores the redelivery counter for each message.</p></td><td></td><td></td></tr></tbody></table>

### Redelivery Policy Message Identifier

Configures how to identify a redelivered message and how to find out when the message was
redelivered.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Use Secure Hash</p></td><td><div><div><p>Boolean</p></div></div></td><td><p>If <code>true</code>, Mule uses a secure hash algorithm to identify a redelivered message.</p></td><td></td><td></td></tr><tr><td><p>Id Expression</p></td><td><div><div><p>String</p></div></div></td><td><p>One or more expressions that determine when a message was redelivered. You can set this property only if the <strong>Use Secure Hash</strong> field is <code>false</code>.</p></td><td></td><td></td></tr></tbody></table>

### Client ID Random Suffix Generator

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Client Id</p></td><td><div><div><p>String</p></div></div></td><td><p>Client ID to identify the connection to the MQTT broker.</p></td><td></td><td></td></tr></tbody></table>

### Client ID Custom Expression Generator

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p>Client Id</p></td><td><div><div><p>String</p></div></div></td><td><p>Client ID to identify the connection to the MQTT broker.</p></td><td></td><td></td></tr><tr><td><p>Custom Client Id Suffix</p></td><td><div><div><p>String</p></div></div></td><td><p>Custom client ID suffix used to identify the connection to the MQTT broker.</p></td><td></td><td></td></tr></tbody></table>

## See Also

[Salesforce Help](https://help.salesforce.com)
