We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ddb06db commit 04ced70Copy full SHA for 04ced70
gcloud/pubsub/message.py
@@ -51,11 +51,15 @@ def attributes(self):
51
52
@property
53
def timestamp(self):
54
- """Return timestamp from attributes, if passed.
+ """Return sortable timestamp from attributes, if passed.
55
+
56
+ Allows sorting messages in publication order (assuming consistent
57
+ clocks across all publishers).
58
59
:rtype: datetime
60
:returns: timestamp (in UTC timezone) parsed from RFC 3339 timestamp
- :raises: ValueError if timestamp not in ``attributes``, or malformed
61
+ :raises: ValueError if timestamp not in ``attributes``, or if it does
62
+ not match the RFC 3339 format.
63
"""
64
stamp = self.attributes.get('timestamp')
65
if stamp is None:
0 commit comments