Skip to content

pubsub: topic.publish string payloads sent wrapped with quotation marks #2403

@fixermark

Description

@fixermark

Environment details

  • OS: (Google Cloud Function)
  • Node.js version: (Google Cloud Function default)
  • npm version: (Google Cloud Function)
  • google-cloud-node version: ~0.10.0

Steps to reproduce

  1. const pubsub = require("@google-cloud/pubsub")();
  2. const topic = pubsub.topic('my-topic');
  3. topic..publish('hello!', (err) => console.log(err));

Expected result:
topic subscriber receives
hello!

Observed result
topic subscriber receives
"hello!"

(... i.e. it appears the data payload is escaped into a string before being sent instead of the string content itself being sent)

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