Beam/Dataflow PubsubIO:默认时间戳是什么时候分配的?

Beam/Dataflow PubsubIO: When is default timestamp assigned?

如果在发布时或读取时没有分配时间戳属性,那么什么时间戳用于开窗? Documentation 指出系统第一次看到每条记录。这个系统数据流拓扑还是Pub/Sub?

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.

当您未指定时间戳属性时分配给消息的时间戳是在 pubsub 消息上设置的"publishTime"。

参见:https://github.com/apache/beam/blob/50d0760faf01bdcdea988157a6b732bb448ba4b8/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubJsonClient.java#L178