I am implementing a service that publishes messages with no data to a Topic.
I would like to implement the service without having to add payloadFormat: "NONE" to my attributes map. This appears to be a convention used for Cloud Storage.
The following guards on BroadwayCloudPubSub.PullClient.decode_message/1 allow for this implementation without having to use the payloadFormat field:
defp decode_message(message) when is_map(message) and not is_map_key(message, "data"), do: message
Hi all,
This was recently closed as completed in https://github.com/dashbitco/broadway_cloud_pub_sub/pull/99.
I am implementing a service that publishes messages with no data to a Topic.
I would like to implement the service without having to add
payloadFormat: "NONE"
to myattributes
map. This appears to be a convention used for Cloud Storage.The following guards on
BroadwayCloudPubSub.PullClient.decode_message/1
allow for this implementation without having to use thepayloadFormat
field:I tested this change using the method German Velasco describes in Prying Into Elixir Dependencies.
Is it possible to update the recent implementation with the above suggestion or something similar?
I'll include a PR with this change as well in case the idea is agreeable.