Closed jadn123 closed 4 years ago
Thank you for the issue. This sounds great!!! I'm out of town this week but come the weekend, I'll affect the change and update the project. I'm delighted to accomodate feedback from users like yourself and appreciate you letting me know your needs and desires.
Neil
Seems I made a mess of this. Checking my own documentation, the intent was that the message propagated from PubSub-In was supposed to have a msg.message
object which contains the original published message as a whole. From this, one could then access the properties msg.message.attributes
to get the attributes. This was simply missing and I am at a loss to understand why. I have now added that logic and pushed the changes. I'll leave this issue open until I hear back from you that this is sufficient. We should now be able to access attributes at msg.message.attributes
.
Thanks for the quick response and action 👍 The change looks good to me, now we can access all the original information.
Thank you my friend. Am closing out this issue but feel free to add new ones as needed. I'll be here :-)
Today the
data
property of the PubSubMessage is mapped tomsg.payload
. https://github.com/GoogleCloudPlatform/node-red-contrib-google-cloud/blob/master/pubsub-in.js#L77-L79Would be good to also output the
attributes
attached to a PubSubMessage tomsg.attributes
or similar.Something like this (Note, I have never developed any Node-RED nodes though).
Made this small change locally and it works.