beam-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Beam JIRA Bot (Jira)" <>
Subject [jira] [Commented] (BEAM-10926) Specify the event time when consuming pubsub data.
Date Tue, 17 Nov 2020 17:12:01 GMT


Beam JIRA Bot commented on BEAM-10926:

This issue is P2 but has been unassigned without any comment for 60 days so it has been labeled
"stale-P2". If this issue is still affecting you, we care! Please comment and remove the label.
Otherwise, in 14 days the issue will be moved to P3.

Please see for a detailed explanation
of what these priorities mean.

> Specify the event time when consuming pubsub data.
> --------------------------------------------------
>                 Key: BEAM-10926
>                 URL:
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-gcp
>            Reporter: Jian Zheng
>            Priority: P2
>              Labels: stale-P2
> I need to specify the event time when consuming pubsub data.
> {code:java}
> PCollection<PubsubMessage> pubsubMessages = pipeline.apply("Read Pub/Sub Data",
>        PubsubIO.readMessagesWithAttributes()
>                 .withTimestampAttribute(options.getTimeAttribute())
>                 .fromSubscription(options.getInputSubscription()));
> {code}
> The only way to do this is to use the {color:#ff0000}withTimestampAttribute(){color}
> But if  I use a timestamp in some other format, such as a 19-bit nanosecond, or if
save the event time in the payload. The method won't work !
> So I had to extend the PubsubClient class and override the PubsubClient. extractTimestamp()
> I'am hoping to provide a way to pass in some implementation class that would allow to
parse out timestamp from the current pubsub message.
> My beam version is 2.19.0.

This message was sent by Atlassian Jira

View raw message