When reading from Cloud Pub/Sub where record timestamps are provided as Pub/Sub message
attributes, specifies the name of the attribute that contains the timestamp.
The timestamp value is expected to be represented in the attribute as either:
- a numerical value representing the number of milliseconds since the Unix epoch. For
example, if using the Joda time classes,
Instant#getMillis() returns the
correct value for this attribute.
- a String in RFC 3339 format. For example,
2015-10-29T23:41:41.123Z. The
sub-second component of the timestamp is optional, and digits beyond the first three
(i.e., time units smaller than milliseconds) will be ignored.
If
timestampAttribute is not provided, the system will generate record timestamps
the first time it sees each record. All windowing will be done relative to these timestamps.
By default, windows are emitted based on an estimate of when this source is likely done
producing data for a given timestamp (referred to as the Watermark; see
AfterWatermark for more details). Any late data will be handled by the trigger specified
with the windowing strategy – by default it will be output immediately.
Note that the system can guarantee that no late data will ever be seen when it assigns
timestamps by arrival time (i.e.
timestampAttribute is not provided).