From 4cbe7bd73a5e129fce1a1d7fa80041e155e3562b Mon Sep 17 00:00:00 2001 From: Jan Pretzel Date: Tue, 11 Apr 2017 22:17:57 +0200 Subject: [PATCH] docs: messages published as JSON --- packages/pubsub/src/topic.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/pubsub/src/topic.js b/packages/pubsub/src/topic.js index ab58d94f584..e5fe34c40d5 100644 --- a/packages/pubsub/src/topic.js +++ b/packages/pubsub/src/topic.js @@ -369,6 +369,9 @@ Topic.prototype.getSubscriptionsStream = function(options) { * box your message in to an object with a `data` and `attributes` property. * `data` will be the raw message value you want to publish, and * `attributes` is a key/value pair of attributes to apply to the message. + * All messages not provided as `Buffer` will be published in JSON format. + * If your receiving end uses another library, make sure it parses the + * message properly. * @param {object=} options - Configuration object. * @param {boolean} options.raw - Enable if you require setting attributes on * your messages.