Learn what Felgo offers to help your business succeed. Start your free evaluation today! Felgo for Your Business

QMqttSubscriptionProperties Class

The QMqttSubscriptionProperties class represents configuration options a QMqttClient can pass to the server when subscribing to a topic filter. More...

Header: #include <QMqttSubscriptionProperties>
CMake: find_package(Qt6 REQUIRED COMPONENTS Mqtt)
target_link_libraries(mytarget PRIVATE Qt6::Mqtt)
qmake: QT += mqtt
Since: Qt 5.12

Public Functions

bool noLocal() const
void setNoLocal(bool noloc)
void setSubscriptionIdentifier(quint32 id)
void setUserProperties(const QMqttUserProperties &user)
quint32 subscriptionIdentifier() const
QMqttUserProperties userProperties() const

Detailed Description

Note: Subscription properties are part of the MQTT 5.0 specification and cannot be used when connecting with a lower protocol level. See QMqttClient::ProtocolVersion for more information.

Member Function Documentation

[since 6.4] bool QMqttSubscriptionProperties::noLocal() const

Returns true if the subscription shall not receive local messages on the same topic.

This function was introduced in Qt 6.4.

See also setNoLocal().

[since 6.4] void QMqttSubscriptionProperties::setNoLocal(bool noloc)

Sets the subscription option to not receive local message. When a client publishes a message with the same topic as an existing local subscription the server by default sends the message back to the client. If noloc is set to true the broker will not send any message the same client has published.

This function was introduced in Qt 6.4.

See also noLocal().

void QMqttSubscriptionProperties::setSubscriptionIdentifier(quint32 id)

Sets the subscription identifier to id.

See also subscriptionIdentifier().

void QMqttSubscriptionProperties::setUserProperties(const QMqttUserProperties &user)

Sets the user properties to user.

See also userProperties().

quint32 QMqttSubscriptionProperties::subscriptionIdentifier() const

Returns the subscription identifier used to describe this subscription.

See also setSubscriptionIdentifier().

QMqttUserProperties QMqttSubscriptionProperties::userProperties() const

Returns the user specified properties.

See also setUserProperties().

Qt_Technology_Partner_RGB_475 Qt_Service_Partner_RGB_475_padded