-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WritePubSubMessage requires pubsubMessage to have Attributes #1092
Comments
Calling WritePubSubMessage will eventually lead to a call of message.ReadBinary(). This method tries to iterate over the Attribute map that could be uninitialized since the binding.Start() method no longer adds an empty map. |
@toshi38 thx for flagging! Quick question: what's your use case for directly using the low-level protocol calls instead of the higher-level protocol |
tbh, the likely answer is, we didn't know better. |
OK. So would you be open to adapt the "recommended" approach using the higher-level components the SDK offers? Yes, it's also a code change, but perhaps for the better? |
Since the change in #976 it seems that Attributes property needs to be defined on the output message prior to calling
WritePubSubMessage
previously this wasn't strictly needed (at least it didn't exist this way in our code).Which raises the question, should I need to have an
Attributes
field prior to callingWritePubSubMessage()
or should it work with an empty message?Alternatively is there a proper way that I should instantiate a
pubsub.Message
other than how I have below?Broken:
Working:
The text was updated successfully, but these errors were encountered: