dashbitco / broadway_cloud_pub_sub

A Broadway producer for Google Cloud Pub/Sub
Apache License 2.0
70 stars 24 forks source link

Handle messages without data #99

Closed mcrumm closed 5 months ago

mcrumm commented 6 months ago

Messages with payloadFormat: "NONE" may not contain the data attribute. Note something may have changed on Google's side because I believe this was previously handled by the nil check.

Closes #98

mcrumm commented 6 months ago

@wojtekmach We could get more specific and pattern match on the message attributes but I am not sure there is much virtue in it. What do you think?

josevalim commented 6 months ago

We could get more specific and pattern match on the message attributes

The benefit of doing that is that, if there is a new format in the future, we won't try to accidentally decode without knowing what it actually is.