{"metadata":{"name":"hew/queue/mqtt","vers":"0.7.2","description":"Typed, actor-owned MQTT 3.1.1 publish/subscribe client","license":"MIT OR Apache-2.0","authors":["Hew Contributors"],"deps":[],"features":{},"edition":"2026","hew":">=0.10.0, <0.12.0","keywords":["messaging","mqtt","pubsub","queue","iot"],"repository":"https://github.com/hew-lang/ecosystem","readme":"# hew.queue.mqtt\n\nA typed, actor-owned MQTT 3.1.1 client for Hew. Publish and subscribe errors\nare values, invalid QoS levels are rejected, and receive timeouts are represented\nby `Receive.Missing`.\n\nRun a broker and the example from the repository root:\n\n```sh\ndocker run --rm -d --name hew-mqtt -p 1883:1883 eclipse-mosquitto:2.0.22 \\\n  mosquitto -c /mosquitto-no-auth.conf\nhew run --pkg-path . queue/mqtt/examples/pubsub.hew\n```\n\nEach `Conn` method is a `receive fn` that returns `T fails MqttError`, so a\ncall replies with `Result<T, ActorError<MqttError>>`: `.Ok(value)` on success,\n`.Err(.Failed(error))` when the MQTT operation fails, and another `.Err` when\nthe actor could not answer.\n\n```hew\nimport hew.queue.mqtt;\n\nfn main() {\n    let client = spawn mqtt.Conn { options: mqtt.Options {\n        host: \"127.0.0.1\", port: 1883,\n        client_id: \"hew-readme\", keepalive_seconds: 30,\n    } };\n    let _ = client.subscribe(\"hew/readme\", mqtt.QoS.AtLeastOnce);\n    let _ = client.publish(\"hew/readme\", \"hello\", mqtt.QoS.AtLeastOnce, false);\n    match client.next_message(1000) {\n        .Ok(.Message(message)) => println(message.payload),\n        .Ok(.Missing) => println(\"no message arrived\"),\n        .Err(.Failed(error)) => println(mqtt.error_message(error)),\n        .Err(_) => println(\"MQTT actor stopped before replying\"),\n    }\n    stop(client);\n    stopped(client);\n}\n```\n"},"version":{"name":"hew/queue/mqtt","vers":"0.5.0","deps":[],"features":{},"cksum":"sha256:0d332791b0366fbc0e68ffeb162d985d964d8348f2614dadd49c902403697748","sig":"ed25519:eaa45b87a35f686b6c7d2da31f5155a0751d46dfe8262c4beafa30117f15464b16ba55c22ae29ef5d6329c4dce523af5a124a6b181999c9718b3f0a0ce763102","key_fp":"SHA256:EGxvQ8Gktjf0VMLt5eW4gxeKAR30l3wnVMa2c/DuSHQ","yanked":false,"edition":"2026","hew":">=0.8.0, <0.9.0","registry_sig":"ed25519:a1f84e030d8bb18a798daa9327f2e5967010d631e3cfe8b5c85ee087534a187554a133e1c8c38f53cd3c6d823633ba4d77d3dd1ffe211b1e0f82c4a82906690c","registry_key_fp":"SHA256:NR2yrof9/ZWkCWyhDODRU8Yvm9Lob/0yYVTdCKzMHb8","published_at":"2026-10-24T00:00:05.325Z","dl":"https://cdn.hewpkg.com/tarballs/hew/queue/mqtt/0.5.0.tar.zst"}}