Registry / networking / rumqttc

rumqttc

JSON →
library0.25.1rscratesunverified

An efficient and robust MQTT client for your connected devices.

# Cargo.toml [dependencies] rumqttc = "0.25.1"
INSTALL
IMPORT
SIG · RUMQTTC
R
rumqttc
networkingrustv0.25.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

AsyncClient
use rumqttc::AsyncClient;

Connect to an MQTT broker and subscribe to a topic.

use rumqttc::{AsyncClient, MqttOptions}; let mqttoptions = MqttOptions::new("test", "localhost", 1883); let (client, mut eventloop) = AsyncClient::new(mqttoptions, 10); client.subscribe("topic", rumqttc::QoS::AtMostOnce).await.unwrap();
Debug
Known issues
gotchaRequires an async runtime like Tokio.
fix
Add `tokio` as a dependency and use `#[tokio::main]` or similar.
affects: *
Upgrade
Version history
0.25.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Resources
rumqttc — cargo add rumqttc · libregistry