-
Notifications
You must be signed in to change notification settings - Fork 639
Closed
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.
Description
Environment details
- OS: Mac OS
- Node.js version: 6.8.1
- npm version:3.8.10
- google-cloud-node version:0.42.2
Steps to reproduce
- require
google-cloud
var pubsub = gcloud.pubsub;
var topic = pubsubClient.topic('my-topic');
topic.subscribe('subscription-name', options, function(err, subscription) {
subscription.on('message', function(message){
console.log(message.data) //message.data = Contents of the message. is undefined and all the data contents are in the message variable
});
});Example (content of the message, the item_id,body and to are supposed to be under data) according to https://github.com/GoogleCloudPlatform/google-cloud-node/blob/v0.42.2/packages/pubsub/src/subscription.js#L142
ackId=RUXMjY, id=966xxxx, item_id=574, body=xxxx test, to=xxxx87832, , ack=function () { [native code] }, skip=function () {
delete self.inProgressAckIds[message.ackId];
self.refreshPausedStatus_();
}
Metadata
Metadata
Assignees
Labels
api: pubsubIssues related to the Pub/Sub API.Issues related to the Pub/Sub API.