Modifier and Type | Class and Description |
---|---|
static class |
PubsubIO.Write.Bound<T>
|
Modifier and Type | Method and Description |
---|---|
static PubsubIO.Write.Bound<String> |
idLabel(String idLabel)
Creates a transform that writes to Pub/Sub, adding each record's unique identifier to the
published messages in an attribute with the specified name.
|
static PubsubIO.Write.Bound<String> |
named(String name)
Creates a transform that writes to Pub/Sub with the given step name.
|
static PubsubIO.Write.Bound<String> |
timestampLabel(String timestampLabel)
Creates a transform that writes to Pub/Sub, adds each record's timestamp to the published
messages in an attribute with the specified name.
|
static PubsubIO.Write.Bound<String> |
topic(String topic)
Creates a transform that publishes to the specified topic.
|
static <T> PubsubIO.Write.Bound<T> |
withCoder(Coder<T> coder)
Creates a transform that uses the given
Coder to encode each of the
elements of the input collection into an output message. |
public static PubsubIO.Write.Bound<String> named(String name)
public static PubsubIO.Write.Bound<String> topic(String topic)
See PubsubIO.PubsubTopic.fromPath(String)
for more details on the format of the
topic
string.
public static PubsubIO.Write.Bound<String> timestampLabel(String timestampLabel)
Instant.Instant(long)
can be used to parse this value.
If the output from this sink is being read by another Dataflow source, then
PubsubIO.Read.timestampLabel(String)
can be used to ensure the other source reads
these timestamps from the appropriate attribute.
public static PubsubIO.Write.Bound<String> idLabel(String idLabel)
If the the output from this sink is being read by another Dataflow source, then
PubsubIO.Read.idLabel(String)
can be used to ensure that* the other source reads
these unique identifiers from the appropriate attribute.
public static <T> PubsubIO.Write.Bound<T> withCoder(Coder<T> coder)
Coder
to encode each of the
elements of the input collection into an output message.
By default, uses StringUtf8Coder
, which writes input Java strings directly as
records.
T
- the type of the elements of the input PCollection