public static class PubsubIO.Write
extends java.lang.Object
PCollection<String> to a Pubsub stream.| Modifier and Type | Class and Description |
|---|---|
static class |
PubsubIO.Write.Bound
A PTransfrom that writes a unbounded
PCollection<String>
to a PubSub stream. |
| Constructor and Description |
|---|
PubsubIO.Write() |
| Modifier and Type | Method and Description |
|---|---|
static PubsubIO.Write.Bound |
idLabel(java.lang.String idLabel)
If specified, Dataflow will add a Pubsub label to each output record containing a unique
identifier for that record.
|
static PubsubIO.Write.Bound |
named(java.lang.String name) |
static PubsubIO.Write.Bound |
timestampLabel(java.lang.String timestampLabel)
If specified, Dataflow will add a Pubsub label to each output record specifying the logical
timestamp of the record.
|
static PubsubIO.Write.Bound |
topic(java.lang.String topic)
The topic to publish to.
|
public static PubsubIO.Write.Bound named(java.lang.String name)
public static PubsubIO.Write.Bound topic(java.lang.String topic)
/topics/<project>/<topic>,
where <project> is the name of the publishing project.public static PubsubIO.Write.Bound timestampLabel(java.lang.String timestampLabel)
<timestampLabel> determines the label name. The label value
is a numerical value representing the number of milliseconds since the Unix epoch. For
example, if using the joda time classes, the org.joda.time.Instant(long) constructor can be
used to parse this value. If the output from this sink is being read by another Dataflow
source, then PubsubIO.Read.timestampLabel can be used to ensure that the other source reads
these timestamps from the appropriate label.public static PubsubIO.Write.Bound idLabel(java.lang.String idLabel)
<idLabel> determines the label name. The label value
is an opaque string value. This is useful if the the output from this sink is being read
by another Dataflow source, in which case PubsubIO.Read.idLabel can be used to ensure that
the other source reads these ids from the appropriate label.