Skip to content

Pubsub message timestamp broken #1623

@ptone

Description

@ptone

The message timestamp for pubsub is fully broken - it is looking for the timestamp in a message attribute, but per the docs, it is a primary field of the message resource.

https://github.com/GoogleCloudPlatform/gcloud-python/blob/master/gcloud/pubsub/message.py#L51

the docs - clearly reference in source comments point to where the timestamp actually is:
https://cloud.google.com/pubsub/reference/rest/v1/PubsubMessage

In API explorer, here is the returned value:

cache-control:  private
content-encoding:  gzip
content-length:  322
content-type:  application/json; charset=UTF-8
date:  Thu, 17 Mar 2016 01:20:32 GMT
server:  ESF
vary:  Origin, X-Origin, Referer

{
 "receivedMessages": [
  {
   "ackId": "Pn4qKUVBXkASTCEcRElTK0MLKlgRTgQhIT4wPkVTRFAGFixdRkhRNxkIaFEOT14jPzUgKEUXC1MTUVx2BFgQajNcdQdRDRh3fml3aFhCAwBNWX5VWzM9SmJddgRYChl1eGB3aVIbASrfoMQWZhk9XBJLLA",
   "message": {
    "data": "dGhpcyBpcyB0aGUgbWVzc2FnZV9wYXlsb2FkMg==",
    "messageId": "13397075123880",
    "publishTime": "2016-03-17T01:13:41.166Z"
   }
  }
 ]
}

Metadata

Metadata

Assignees

Labels

api: pubsubIssues related to the Pub/Sub API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions