Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

MQTT Producer

Parent article

The MQTT Producer step allows you to publish messages in near-real-time to an MQTT broker. Within a transformation, the MQTT Producer step publishes a stream of records to one MQTT topic.

For more information about the MQTT protocol, see: https://www.hivemq.com/mqtt/

General

Enter the following information in the transformation step name field.

  • Step name: Specifies the unique name of the transformation on the canvas. You can customize the name or leave MQTT Producer as the default.

MQTT Producer step dialog

Options

The MQTT Producer step includes several tabs. Each tab is described below.

Setup tab

In the Setup tab, define the connection to the MQTT server, the topics for publishing, Quality of Service level, and the Message field:

OptionDescription
ConnectionSpecify the address of the MQTT server to which this step will connect for sending or receiving messages.
Client IDSpecify a unique ID for the MQTT client. The MQTT server uses this Client ID to recognize each distinct client and that client's current state.
Topic

Specify the Topic name using one of the following methods:

  • Select Specify topic to enter a specific Topic name. Then, in the Topic name field, enter the name of the MQTT topic to which you want to publish streaming data (messages). Each MQTT Producer step will start a single thread for publishing.
  • Select Get data from field to specify a Topic name based on a field from another step which is generating rows in the same transformation stream. Using the dropdown list, then select the name of the field you want to use. You can use this option to dynamically control setting the value for the Topic name. Each individual message will still have only one topic, but each row coming into the MQTT Producer step will generate a new message with a potentially different topic.
Quality of Service (QoS)

Quality of Service (QoS) is a level of guarantee for message delivery. Select one of the following options.

  • At most once (0), which is the default value
  • At least once (1)
  • Exactly once (2)
Message FieldSelect the individual record contained in a topic that you want to send.

Security tab

MQTT Producer step Security           tab

The security tab includes the following options:

OptionDescription
UsernameSpecify the user name required to access the MQTT server.
PasswordSpecify the password associated with the Username.
Use secure protocol

Select this option if you want to define SSL properties for the connection.

This security protocol setting is used only on Kettle. It is not used on AEL Spark.

SSL Properties
  • ssl.contextProvider

    Specify the underlying JSSE provider.

  • ssl.enabledCipherSuites

    Specify which ciphers are enabled. Values are dependent on the provider.

  • ssl.keyManager

    Specify the algorithm that will be used to create a KeyManagerFactory object instead of using the default algorithm available in the platform.

  • ssl.keyStore

    Specify the name of the file that contains the KeyStore object that you want the KeyManager to use.

  • ssl.keyStorePassword

    Specify the password for the KeyStore object that you want the KeyManager to use.

  • ssl.keyStoreProvider

    Specify the identifying name or string for the key store provider.

  • ssl.keyStoreType

    Specify the identifying name or string for the type of key store.

  • ssl.protocol

    Specify the type of SSL protocol to use.

  • ssl.trustManager

    Specify the algorithm that will be used to create a TrustManagerFactory object, instead of using the default algorithm available in the platform.

  • ssl.trustStore

    Specify the name of the file that contains the KeyStore object that you want the TrustManager to use.

  • ssl.trustStorePassword

    Specify the password for the TrustStore object that you want the TrustManager to use.

  • ssl.trustStoreProvider

    Specify the identifier or string for the trust store provider.

  • ssl.trustStoreType

    Specify the type of KeyStore object that you want the TrustManager to use.

Options tab

MQTT Producer step Options           tab

The Options tab includes the following MQTT-specific parameters:

ParameterDescription
Keep Alive IntervalSpecify a maximum number of interval seconds that is permitted to elapse between the point at which the PDI client finishes transmitting one Control Packet and the point it starts sending the next.
Max InflightSpecify a number for the maximum number of messages to have in process at any given time.
Connection TimeoutSpecify the time, in seconds, to disconnect if a message is not received.
Clean Session

Specify if the broker will store or purge messages for a session. Select one of the following.

  • True

    When set to True, the broker will not store any information for the client. All information from a previous persistent session will be purged.

  • False

    When set to False, the broker will store all subscriptions for the client. When the QoS (Quality of Service) parameter is set to either 1 or 2, all missed messages will be stored.

Storage Level

Indicates if messages are stored in memory or on disk.

  • The default (blank) is memory.
  • For disk, enter a valid path.

This setting is used only on Kettle. It is not used on AEL Spark, which uses its own configuration.

Server URIsSpecify the MQTT server’s universal resource identifier (URI).
MQTT VersionSpecify the MQTT protocol version that this step is connecting to.
Automatic Reconnect

Enables the client to attempt an automatic re-connect to the server if it becomes disconnected. Select True or False:

  • True

    Yes, attempt to reconnect to the server.

  • False

    No, do not attempt to reconnect to the server.

Metadata injection support

All fields of this step support metadata injection. You can use this step with ETL metadata injection to pass metadata to your transformation at runtime.