| CARVIEW |
Select Language
HTTP/1.1 200 OK
Connection: keep-alive
Server: nginx/1.24.0 (Ubuntu)
Content-Type: text/html; charset=utf-8
Cache-Control: public, max-age=300
Content-Encoding: gzip
Via: 1.1 varnish, 1.1 varnish
Accept-Ranges: bytes
Age: 0
Date: Sat, 17 Jan 2026 00:34:33 GMT
X-Served-By: cache-dfw-ktki8620062-DFW, cache-bom-vanm7210036-BOM
X-Cache: MISS, MISS
X-Cache-Hits: 0, 0
X-Timer: S1768610073.783600,VS0,VE321
Vary: Accept, Accept-Encoding
transfer-encoding: chunked
net-mqtt: An MQTT Protocol Implementation.
net-mqtt: An MQTT Protocol Implementation.
Modules
[Index] [Quick Jump]
Downloads
- net-mqtt-0.8.6.3.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.1.0.0, 0.2.0.0, 0.2.1.0, 0.2.2.0, 0.2.3.0, 0.2.3.1, 0.2.4.0, 0.2.4.1, 0.2.4.2, 0.5.0.0, 0.5.0.1, 0.5.0.2, 0.5.1.0, 0.6.0.0, 0.6.0.1, 0.6.0.2, 0.6.1.0, 0.6.1.1, 0.6.2.0, 0.6.2.1, 0.6.2.2, 0.6.2.3, 0.7.0.0, 0.7.0.1, 0.7.1.0, 0.7.1.1, 0.8.0.0, 0.8.0.1, 0.8.0.2, 0.8.1.0, 0.8.2.0, 0.8.2.1, 0.8.2.2, 0.8.2.3, 0.8.2.4, 0.8.2.5, 0.8.3.0, 0.8.5.0, 0.8.6.0, 0.8.6.1, 0.8.6.2, 0.8.6.3 |
|---|---|
| Change log | Changelog.md |
| Dependencies | async (>=2.2.1 && <2.3), attoparsec (>=0.13.2 && <0.15), attoparsec-binary (>=0.2 && <1.0), base (>=4.7 && <5), binary (>=0.8.5 && <0.9), bytestring (>=0.10.8 && <0.13), conduit (>=1.3.1 && <1.5), conduit-extra (>=1.3.0 && <1.5), containers (>=0.5.0 && <0.8), crypton-connection (>=0.3.0), data-default-class (>=0.1.2), deepseq (>=1.4.3.0 && <1.6), monad-loops (>=0.4.3), net-mqtt, network-conduit-tls (>=1.4 && <1.5), network-uri (>=2.6.1 && <2.7), optparse-applicative, QuickCheck (>=2.12.6.1 && <2.17), stm (>=2.4.0 && <2.6), text (>=1.2.3 && <2.2.0), time (>=1.9), websockets (>=0.12.5.3 && <0.14) [details] |
| License | BSD-3-Clause |
| Copyright | BSD3 |
| Author | Dustin Sallings |
| Maintainer | dustin@spy.net |
| Uploaded | by dustin at 2025-10-24T17:05:17Z |
| Category | Network |
| Home page | https://github.com/dustin/mqtt-hs#readme |
| Bug tracker | https://github.com/dustin/mqtt-hs/issues |
| Source repo | head: git clone https://github.com/dustin/mqtt-hs |
| Distributions | NixOS:0.8.6.3, Stackage:0.8.6.3 |
| Reverse Dependencies | 3 direct, 0 indirect [details] |
| Executables | mqtt-watch, mqtt-example |
| Downloads | 15735 total (129 in the last 30 days) |
| Rating | 2.25 (votes: 2) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2025-10-24 [all 1 reports] |
Readme for net-mqtt-0.8.6.3
[back to package description]mqtt
An MQTT protocol implementation for Haskell.
Client Examples
Publish
import Network.MQTT.Client
import Network.URI (parseURI)
main :: IO ()
main = do
let (Just uri) = parseURI "mqtt://test.mosquitto.org"
mc <- connectURI mqttConfig uri
publish mc "tmp/topic" "hello!" False
Subscribe
import Network.MQTT.Client
import Network.URI (parseURI)
main :: IO ()
main = do
let (Just uri) = parseURI "mqtt://test.mosquitto.org"
mc <- connectURI mqttConfig{_msgCB=SimpleCallback msgReceived} uri
print =<< subscribe mc [("tmp/topic1", subOptions), ("tmp/topic2", subOptions)] []
waitForClient mc -- wait for the the client to disconnect
where
msgReceived _ t m p = print (t,m,p)