{"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.7.2","deps":[],"features":{},"cksum":"sha256:15e0ba4b0c5b89583dfb4ff7a5083c83fe82750865d6b730c2b88027668f7679","sig":"ed25519:971ecfaa4d6c69dc8165b62aba3f5941882a679686267870ea308a0f3c0ddf3b8ad14e509c2d4a835e2654a2c7d4bd1d50dc156b81c66c826f572c95e4fbaa0a","key_fp":"SHA256:vkO7V1p3cCOVINfcMAEcuY77sokKlwFJ9Av3WsHRDgQ","yanked":false,"edition":"2026","hew":">=0.10.0, <0.12.0","registry_sig":"ed25519:c124f7527f66bdf0998c5cabefaaa01f05842a123c2f60951db75772263dbc7cb17eb486667a57a8bd89c96578608b49ad7f41635c8cbacc71fa07cf45ee5b0b","registry_key_fp":"SHA256:NR2yrof9/ZWkCWyhDODRU8Yvm9Lob/0yYVTdCKzMHb8","published_at":"2026-11-21T21:55:23.164Z","dl":"https://cdn.hewpkg.com/tarballs/hew/queue/mqtt/0.7.2.tar.zst"}}