Alex Flint
Alex Flint

Reputation: 6748

Get time of message receipt by pubsub topic

As a subscriber to a pubsub topic, is it possible for me to find out what time a message was received by pubsub? That is, can a subscriber that has just received a message find out what time the corresponding publisher published the message?

Upvotes: 0

Views: 469

Answers (1)

David
David

Reputation: 9731

This is possible with a pull subscriber. Use the publishTime field of PubsubMessage.

If you are using a client library, read the library docs on how to access this. For example, with the python client lib, it is accessible via the publish_time field on the Message class.

Upvotes: 1

Related Questions