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]

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

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.2.0, 1.0.0, 1.0.1, 1.0.2
Dependencies attoparsec (>=0.10 && <0.13), base (>=4.7 && <4.8), 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 2014-08-23T20:47:00Z
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 2014-08-23T20:38:47Z
Distributions
Reverse Dependencies 2 direct, 0 indirect [details]
Downloads 3132 total (9 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

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.