mqtt-hs: A MQTT client library.

[ gpl, library, network ] [ Propose Tags ]

A library to communicate with MQTT brokers. See the Network.MQTT module for documentation and a small example.


[Skip to Readme]
Versions [faq] 0.2.0, 1.0.0, 1.0.1, 1.0.2
Dependencies attoparsec (>=0.10 && <0.13), base (==4.7.*), bytestring (>=0.10.2 && <0.11), monad-loops (>=0.3 && <0.5), mtl (>=1.1 && <2.3), network (>=2.0 && <2.7), singletons (>=0.9 && <1.1), text (>=0.11.0.6 && <1.2) [details]
License GPL-3.0-only
Copyright (c) 2014 Lukas Braun
Author Lukas Braun <koomi+mqtt@hackerspace-bamberg.de>
Maintainer Lukas Braun <koomi+mqtt@hackerspace-bamberg.de>
Revised Revision 1 made by LukasBraun at Sat Aug 23 20:47:00 UTC 2014
Category Network
Home page http://github.com/k00mi/mqtt-hs
Source repo head: git clone git://github.com/k00mi/mqtt-hs.git
Uploaded by LukasBraun at Sat Aug 23 20:38:47 UTC 2014
Distributions NixOS:1.0.2
Downloads 2274 total (143 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

For package maintainers and hackage trustees


Readme for mqtt-hs-0.2.0

[back to package description]

mqtt-hs

A Haskell MQTT client library.

A simple example, assuming a broker is running on localhost (needs -XOverloadedStrings):

import Network.MQTT
import Network.MQTT.Logger
Just mqtt <- connect defaultConfig { cLogger = warnings stdLogger }
let f t payload = putStrLn $ "A message was published to " ++ show t ++ ": " ++ show payload
subscribe mqtt NoConfirm "#" f
publish mqtt Handshake False "some random/topic" "Some content!"

See the haddock for more documentation.