public abstract static class MqttIO.Read
extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<byte[]>>
PTransform to read from a MQTT broker.| Constructor and Description |
|---|
Read() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.sdk.values.PCollection<byte[]> |
expand(org.apache.beam.sdk.values.PBegin input) |
void |
populateDisplayData(org.apache.beam.sdk.transforms.display.DisplayData.Builder builder) |
MqttIO.Read |
withConnectionConfiguration(MqttIO.ConnectionConfiguration configuration)
Define the MQTT connection configuration used to connect to the MQTT broker.
|
MqttIO.Read |
withMaxNumRecords(long maxNumRecords)
Define the max number of records received by the
MqttIO.Read. |
MqttIO.Read |
withMaxReadTime(org.joda.time.Duration maxReadTime)
Define the max read time (duration) while the
MqttIO.Read will receive messages. |
public MqttIO.Read withConnectionConfiguration(MqttIO.ConnectionConfiguration configuration)
public MqttIO.Read withMaxNumRecords(long maxNumRecords)
MqttIO.Read. When this max number of
records is lower than Long.MAX_VALUE, the MqttIO.Read will provide a bounded PCollection.public MqttIO.Read withMaxReadTime(org.joda.time.Duration maxReadTime)
MqttIO.Read will receive messages. When this
max read time is not null, the MqttIO.Read will provide a bounded PCollection.public org.apache.beam.sdk.values.PCollection<byte[]> expand(org.apache.beam.sdk.values.PBegin input)
expand in class org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PBegin,org.apache.beam.sdk.values.PCollection<byte[]>>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.PBegin,org.apache.beam.sdk.values.PCollection<byte[]>>