You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@beam.apache.org by Hemali Sutaria <hs...@paloaltonetworks.com> on 2021/07/13 20:23:11 UTC

ProcessContext.timestamp

Beam Developers,

Is ProcessContext timestamp the same as pubsub's publishTime ?

https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage

Or, is it the timestamp when ReadMessageTransform reads from the pubsub ?

Thanks,
Hemali Sutaria

Re: ProcessContext.timestamp

Posted by Luke Cwik <lc...@google.com>.
If timestampAttribute is not provided, the timestamp will be taken from the
Pubsub message's publish timestamp.[1]

1:
https://github.com/apache/beam/blob/947cbb79fe4dfe4e2bc384da488043b509ffbe71/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubIO.java#L802

On Tue, Jul 13, 2021 at 3:45 PM Robert Burke <ro...@frantil.com> wrote:

> IIRC it should be the Publish timestamp, not the read timestamp.
>
> On Tue, Jul 13, 2021, 2:19 PM Hemali Sutaria <
> hsutaria@paloaltonetworks.com> wrote:
>
>> Beam Developers,
>>
>> Is ProcessContext timestamp the same as pubsub's publishTime ?
>>
>> https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage
>>
>> Or, is it the timestamp when ReadMessageTransform reads from the pubsub ?
>>
>> Thanks,
>> Hemali Sutaria
>>
>

Re: ProcessContext.timestamp

Posted by Robert Burke <ro...@frantil.com>.
IIRC it should be the Publish timestamp, not the read timestamp.

On Tue, Jul 13, 2021, 2:19 PM Hemali Sutaria <hs...@paloaltonetworks.com>
wrote:

> Beam Developers,
>
> Is ProcessContext timestamp the same as pubsub's publishTime ?
>
> https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage
>
> Or, is it the timestamp when ReadMessageTransform reads from the pubsub ?
>
> Thanks,
> Hemali Sutaria
>