通过pubsub主题获取消息接收时间

Get time of message receipt by pubsub topic

作为 pubsub 主题的订阅者,我是否可以了解 pubsub 收到消息的时间?即刚收到一条消息的订阅者能否查询到对应的发布者是什么时候发布消息的?

这可以通过 pull subscriber. Use the publishTime field of PubsubMessage 实现。

如果您使用的是客户端库,请阅读库文档以了解如何访问它。例如,使用 python 客户端库,可以通过 publish_time field on the Message class.

访问它