Description:

Publishes a message to an MQTT topic

Tags:

Apache, Kafka, Put, Send, Message, PubSub, 0.9.x

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the Expression Language Guide.

Name Default Value Allowable Values Description
Broker URI The URI to use to connect to the MQTT broker (e.g. tcp://localhost:1883). The 'tcp' and 'ssl' schemes are supported. In order to use 'ssl', the SSL Context Service property must be set.
Client ID MQTT client ID to use
Username Username to use when connecting to the broker
Password Password to use when connecting to the broker
SSL Context Service Controller Service API: SSLContextService Implementation: StandardSSLContextService The SSL Context Service used to provide client certificate information for TLS/SSL connections.
Last Will Topic The topic to send the client's Last Will to. If the Last Will topic and message are not set then a Last Will will not be sent.
Last Will Message The message to send as the client's Last Will. If the Last Will topic and message are not set then a Last Will will not be sent.
Last Will Retain * true * false Whether to retain the client's Last Will. If the Last Will topic and message are not set then a Last Will will not be sent.
Last Will QoS Level 0 -
1 -
2 -
QoS level to be used when publishing the Last Will Message
Session state true * Clean Session
* Resume Session
Whether to start afresh or resume previous flows. See the allowable value descriptions for more details.
MQTT Specification Version 0 AUTO Start with v3.1.1 and fallback to v3.1.0 if not supported by a broker v3.1.1 v3.1.0 The MQTT specification version when connecting with the broker. See the allowable value descriptions for more details.
Connection Timeout (seconds) 30 Maximum time interval the client will wait for the network connection to the MQTT server to be established. The default timeout is 30 seconds. A value of 0 disables timeout processing meaning the client will wait until the network connection is made successfully or fails.
Keep Alive Interval (seconds) 60 Defines the maximum time interval between messages sent or received. It enables the client to detect if the server is no longer available, without having to wait for the TCP/IP timeout. The client will ensure that at least one message travels across the network within each keep alive period. In the absence of a data-related message during the time period, the client sends a very small "ping" message, which the server will acknowledge. A value of 0 disables keep alive processing in the client.
Topic The topic to publish the message to.
Supports Expression Language: true
Quality of Service(QoS) The Quality of Service(QoS) to send the message with. Accepts three values '0', '1' and '2'; '0' for 'at most once', '1' for 'at least once', '2' for 'exactly once'. Expression language is allowed in order to support publishing messages with different QoS but the end value of the property must be either '0', '1' or '2'.
Supports Expression Language: true
Retain Message Whether or not the retain flag should be set on the MQTT message.
Supports Expression Language: true

Relationships:

Name Description
success FlowFiles that are sent successfully to the destination are transferred to this relationship.
failure FlowFiles that failed to send to the destination are transferred to this relationship.

Reads Attributes:

None specified.

Writes Attributes:

None specified.

State management:

This component does not store state.

Restricted:

This component is not restricted.