public abstract static class MqttIO.Write
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<byte[]>,org.apache.beam.sdk.values.PDone>
PTransform to write and send a message to a MQTT server.| Constructor and Description |
|---|
Write() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PDone |
expand(org.apache.beam.sdk.values.PCollection<byte[]> input) |
void |
populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder) |
MqttIO.Write |
withConnectionConfiguration(MqttIO.ConnectionConfiguration configuration)
Define MQTT connection configuration used to connect to the MQTT broker.
|
MqttIO.Write |
withRetained(boolean retained)
Whether or not the publish message should be retained by the messaging engine.
|
public MqttIO.Write withConnectionConfiguration(MqttIO.ConnectionConfiguration configuration)
public MqttIO.Write withRetained(boolean retained)
false will clear the retained message from the
server. The default value is false. When a subscriber connects, it gets the latest
retained message (else it doesn't get any existing message, it will have to wait a new
incoming message).retained - Whether or not the messaging engine should retain the message.MqttIO.Write PTransform with the corresponding retained configuration.public org.apache.beam.sdk.values.PDone expand(org.apache.beam.sdk.values.PCollection<byte[]> input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<byte[]>,org.apache.beam.sdk.values.PDone>public void populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder)
populateDisplayData in interface org.apache.beam.sdk.transforms.display.HasDisplayDatapopulateDisplayData in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<byte[]>,org.apache.beam.sdk.values.PDone>