Open martintupy opened 2 weeks ago
Hey @martintupy, great catch! It seems we didn't catch this on testing since both subscriber & publisher were using the base 64 encoding/decoding. This would have failed if data would have been published from another source.
When a Subscriber is constructed using grcp client
It's then going to fail on following error. Same constructor with http, is fine.
I suspect that PubSubMessage response in rpc protocol isn't base64 encoded, as it's not stated in rpc api docs https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#google.pubsub.v1.PubsubMessage. Unlike REST response, which is base64 encoded https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage
Following line probably shouldn't contain base64 decoding https://github.com/permutive-engineering/fs2-pubsub/blob/main/modules/fs2-pubsub/src/main/scala-2.13%2B/fs2/pubsub/grpc/GrpcConstructors.scala#L143