public class StringMessageMapper extends Object implements MqttMessageMapper
Given a String topic and byte[] message, emits a tuple with fields “topic” and “message”, both of which are Strings.
Constructor and Description |
---|
StringMessageMapper() |
Modifier and Type | Method and Description |
---|---|
Fields |
outputFields()
Returns the list of output fields this Mapper produces.
|
Values |
toValues(MqttMessage message)
Convert a
MqttMessage to a set of Values that can be emitted as a Storm Tuple. |
public Values toValues(MqttMessage message)
MqttMessageMapper
Convert a MqttMessage
to a set of Values that can be emitted as a Storm Tuple.
toValues
in interface MqttMessageMapper
message
- An MQTT Message.public Fields outputFields()
MqttMessageMapper
Returns the list of output fields this Mapper produces.
outputFields
in interface MqttMessageMapper
Copyright © 2022 The Apache Software Foundation. All rights reserved.