public final class CustomMessageMapper extends Object implements MqttMessageMapper
Given a topic name: “users/{user}/{location}/{deviceId}” and a payload of “{temperature}/{humidity}” emits a tuple containing user(String), deviceId(String), location(String), temperature(float),
humidity(float).
| Constructor and Description |
|---|
CustomMessageMapper()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
Fields |
outputFields()
Gets the output fields.
|
Values |
toValues(MqttMessage message)
Converts MQTT message to an instance of
Values. |
public Values toValues(MqttMessage message)
Converts MQTT message to an instance of Values.
toValues in interface MqttMessageMappermessage - the message to convertpublic Fields outputFields()
Gets the output fields.
outputFields in interface MqttMessageMapperCopyright © 2021 The Apache Software Foundation. All rights reserved.