Supports Expression Language: true (will be evaluated using Environment variables only)MQTT Specification Version | MQTT Specification Version | v3 AUTO | - v3 AUTO
![Start with v3.1.1 and fallback to v3.1.0 if not supported by a broker Start with v3.1.1 and fallback to v3.1.0 if not supported by a broker](../../../../../html/images/iconInfo.png) - v5.0
- v3.1.1
- v3.1.0
| The MQTT specification version when connecting with the broker. See the allowable value descriptions for more details. |
Username | Username | | | Username to use when connecting to the broker Supports Expression Language: true (will be evaluated using Environment variables only) |
Password | Password | | | Password to use when connecting to the broker Sensitive Property: true |
SSL Context Service | SSL Context Service | | Controller Service API: SSLContextService Implementations: StandardRestrictedSSLContextService StandardSSLContextService | The SSL Context Service used to provide client certificate information for TLS/SSL connections. |
Session state | Session state | Clean Session | - Clean Session
![Client and Server discard any previous session and start a new one. This session lasts as long as the network connection. State data associated with this session is not reused in any subsequent session Client and Server discard any previous session and start a new one. This session lasts as long as the network connection. State data associated with this session is not reused in any subsequent session](../../../../../html/images/iconInfo.png) - Resume Session
![Server resumes communications with the client based on state from the current session (as identified by the ClientID). The client and server store the session after the client and server are disconnected. After the disconnection of a session that was not a clean session, the server stores further QoS 1 and QoS 2 messages that match any subscriptions that the client had at the time of disconnection as part of the session state Server resumes communications with the client based on state from the current session (as identified by the ClientID). The client and server store the session after the client and server are disconnected. After the disconnection of a session that was not a clean session, the server stores further QoS 1 and QoS 2 messages that match any subscriptions that the client had at the time of disconnection as part of the session state](../../../../../html/images/iconInfo.png)
| Whether to start a fresh or resume previous flows. See the allowable value descriptions for more details. |
Session Expiry Interval | Session Expiry Interval | 24 hrs | | After this interval the broker will expire the client and clear the session state.
This Property is only considered if all of the following conditions are met:- The [Session state] Property has a value of "Resume Session".
- The [MQTT Specification Version] Property has a value of "v5.0".
|
Client ID | Client ID | | | MQTT client ID to use. If not set, a UUID will be generated. Supports Expression Language: true (will be evaluated using Environment variables only) |
Topic | Topic | | | The topic to publish the message to. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) |
Retain Message | Retain Message | | | Whether or not the retain flag should be set on the MQTT message. Supports Expression Language: true (will be evaluated using flow file attributes and Environment variables) |
Quality of Service (QoS) | 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 (will be evaluated using flow file attributes and Environment variables) |
Record Reader | record-reader | | Controller Service API: RecordReaderFactory Implementations: ScriptedReader ReaderLookup YamlTreeReader CSVReader AvroReader SyslogReader ProtobufReader GrokReader Syslog5424Reader JsonPathReader JsonTreeReader XMLReader CEFReader ExcelReader WindowsEventLogReader | The Record Reader to use for parsing the incoming FlowFile into Records. |
Record Writer | record-writer | | Controller Service API: RecordSetWriterFactory Implementations: AvroRecordSetWriter XMLRecordSetWriter ScriptedRecordSetWriter JsonRecordSetWriter CSVRecordSetWriter RecordSetWriterLookup FreeFormTextRecordSetWriter | The Record Writer to use for serializing Records before publishing them as an MQTT Message. |
Message Demarcator | message-demarcator | | | With this property, you have an option to publish multiple messages from a single FlowFile. This property allows you to provide a string (interpreted as UTF-8) to use for demarcating apart the FlowFile content. This is an optional property ; if not provided, and if not defining a Record Reader/Writer, each FlowFile will be published as a single message. To enter special character such as 'new line' use CTRL+Enter or Shift+Enter depending on the OS. Supports Expression Language: true (will be evaluated using Environment variables only) |
Connection Timeout (seconds) | 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) | 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 keepalive processing in the client. |
Last Will Message | Last Will Message | | | The message to send as the client's Last Will. |
Last Will Topic | Last Will Topic | | | The topic to send the client's Last Will to.
This Property is only considered if the [Last Will Message] Property has a value specified. |
Last Will Retain | Last Will Retain | false | | Whether to retain the client's Last Will.
This Property is only considered if the [Last Will Message] Property has a value specified. |
Last Will QoS Level | Last Will QoS Level | 0 - At most once | - 0 - At most once
![Best effort delivery. A message won’t be acknowledged by the receiver or stored and redelivered by the sender. This is often called “fire and forget” and provides the same guarantee as the underlying TCP protocol. Best effort delivery. A message won’t be acknowledged by the receiver or stored and redelivered by the sender. This is often called “fire and forget” and provides the same guarantee as the underlying TCP protocol.](../../../../../html/images/iconInfo.png) - 1 - At least once
![Guarantees that a message will be delivered at least once to the receiver. The message can also be delivered more than once Guarantees that a message will be delivered at least once to the receiver. The message can also be delivered more than once](../../../../../html/images/iconInfo.png) - 2 - Exactly once
![Guarantees that each message is received only once by the counterpart. It is the safest and also the slowest quality of service level. The guarantee is provided by two round-trip flows between sender and receiver. Guarantees that each message is received only once by the counterpart. It is the safest and also the slowest quality of service level. The guarantee is provided by two round-trip flows between sender and receiver.](../../../../../html/images/iconInfo.png)
| QoS level to be used when publishing the Last Will Message.
This Property is only considered if the [Last Will Message] Property has a value specified. |
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.Input requirement:
This component requires an incoming relationship.System Resource Considerations:
Resource | Description |
---|
MEMORY | An instance of this component can cause high usage of this system resource. Multiple instances or high concurrency settings may result a degradation of performance. |
See Also:
ConsumeMQTT