obabec / rust-mqtt

Rust native mqtt client for both std and no_std environmnents.
MIT License
43 stars 24 forks source link

How to add per-message properties #26

Open rmja opened 1 year ago

rmja commented 1 year ago

I would like to add the Property::ContentType to the mqtt messages. connect_to_broker() does not include the property as property_allowed() returns false for that property and send_message() does not include any properties from the config. Ideally there should be some way of specifying per-message properties - is this currently possible? I may be missing something.

rmja commented 1 year ago

One option would be to return some kind of builder when invoking send_message() like reqwless does https://github.com/drogue-iot/reqwless/blob/main/src/client.rs

obabec commented 1 year ago

Hi @rmja feel free to create PR :)