I'm trying to read the timestamp value of a Pubsub message from Apache Beam.
p.apply("Read PubSub messages", PubsubIO.readMessagesWithAttributes()
.withIdAttribute("msg_id")
.withTimestampAttribute("timestamp")
.fromSubscription(options.getPubsubSubscription()))
But unfortunately, I got the following error which really surprises me as I thought every messages had a default timestamp.
An exception occured while executing the Java class.
PubSub message is missing a value for timestamp attribute timestamp
Why is my message not timestamped ? Is it because I published it via the Pubsub UI ?