kayleg / cloud-pubsub

Google Cloud PubSub client in rust
MIT License
31 stars 21 forks source link

Support attributes in EncodedMessage #19

Closed BigJerBD closed 2 years ago

BigJerBD commented 2 years ago

by looking at the payload i've noticed that we only publish the data to Pub/sub

#[derive(Deserialize, Clone, Serialize)]
pub struct EncodedMessage {
    data: String,
}

There's a really useful field named attributes that would be really nice to have. It helps filtering message within a subscription (see https://cloud.google.com/pubsub/docs/reference/rest/v1/PubsubMessage)

I'll make a PR of the forked version that I'm using that has this feature, maybe we can integrate it properly :)

Thanks!