Skip to content
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

No support for Mqttv5 message expiry #523

Open
iSchluff opened this issue Nov 21, 2024 · 0 comments
Open

No support for Mqttv5 message expiry #523

iSchluff opened this issue Nov 21, 2024 · 0 comments
Milestone

Comments

@iSchluff
Copy link

iSchluff commented Nov 21, 2024

Hi, as far as I am aware there is currently no way to pass the v5 message expiry option to the underlying C library?

Because the properties would need to be passed to the MQTTAsync_sendMessage function, but currently there is no signature allowing this.

E.g.
https://github.com/eclipse-paho/paho.mqtt.c/blob/6b1e202a701ffcdaa277b5644ed291287a70a7aa/src/samples/paho_c_pub.c#L352

But currently the cpp publish path looks like this

delivery_token_ptr async_client::publish(const_message_ptr msg,
void* userContext, iaction_listener& cb)
{
delivery_token_ptr tok = delivery_token::create(*this, msg, userContext, cb);
add_token(tok);
delivery_response_options rspOpts(tok, mqttVersion_);
int rc = MQTTAsync_sendMessage(cli_, msg->get_topic().c_str(),
&(msg->msg_), &rspOpts.opts_);

@fpagliughi fpagliughi added this to the v1.5 milestone Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants