Skip to content

Publishing a string in to PubSub topic introduces quotes to the message #2204

@JanPretzel

Description

@JanPretzel

Environment details

  • OS: OS X 10.12.3
  • Node.js version: v6.10.0
  • npm version: 3.10.10
  • @google-cloud/pubsub version: 0.9.0

Steps to reproduce

  1. require @google-cloud/pubsub
  2. publish a message topic.publish('someMessage') (as described in the documentation)
  3. pull the message and it will have "someMessage" as data

I think this is caused because the message data is being stringified if it is not a Buffer here but I do not think it is the intended behaviour? At least the documentation does not make it clear.

Metadata

Metadata

Labels

api: pubsubIssues related to the Pub/Sub API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions