Binary messages are unsupported by the js pubsub API #987
Labels
api: pubsub
Issues related to the Pub/Sub API.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Messages pulled from pubsub using the subscription API are converted from base 64 to UTF 8
https://github.com/GoogleCloudPlatform/gcloud-node/blob/master/lib/pubsub/subscription.js#L298
This is fine for messages that are serialized to strings but for binary data round trips to/from UTF 8 doesn’t work http://haacked.com/archive/2012/01/30/hazards-of-converting-binary-data-to-a-string.aspx/
If there was an encoding option that defaults to
utf8
, receiving binary data e.g. protobuf data from a java app would be possible (currently I am having to use a fork to get this working).I would recommend an option like so
The text was updated successfully, but these errors were encountered: