在 mqtt qos1 中我想将 dup 标志设置为 true 我不知道我没有设置 dup falg 谁能解释一下

问题描述 投票:0回答:0

bool dup = true;

// Publish the message with QoS 1
rc = mosquitto_publish(mosq, &mid, topic, strlen(message), message, 1, false);
if (rc != MOSQ_ERR_SUCCESS)
{
    fprintf(stderr, "Failed to publish message: %s\n", mosquitto_strerror(rc));
    mosquitto_disconnect(mosq);
    return;
}

经纪人不给 1684126876:从 auto-FF3BAA6D-E659-460B-7332-244382A86BDE 接收到 PUBLISH(d0、q1、r0、m1、“示例/主题”……(12 字节)) 1684126876:发送 PUBACK 到 auto-FF3BAA6D-E659-460B-7332-244382A86BDE (m1, rc0)

我想要d1而不是d0

client mqtt publish mosquitto
© www.soinside.com 2019 - 2024. All rights reserved.