Machine Head 1.0.0-beta9 is released
TL;DR
Machine Head is a small Clojure MQTT client.
1.0.0-beta9
is a development milestone that introduces one breaking API change.
Changes Between 1.0.0-beta8 and 1.0.0-beta9
Subscription API Change
Previously clojurewerkz.machine-head.client/subscribe
accepted
a list of topics and optionally a list of QoS levels:
(mh/subscribe c ["mh/topics/#" "mh/alt.topics/+"]
(fn [^String topic meta ^bytes payload])
{:qos [0 1]})
This turns out to be a fairly confusing API.
We’ve changed it to accept a map of topics to QoS levels. While a bit more verbose, this API make it very clear what topic will use what QoS:
(mh/subscribe c {"mh/topics/#" 0 "mh/alt.topics/+" 1}
(fn [^String topic meta ^bytes payload] ))
Changes Between 1.0.0-beta7 and 1.0.0-beta8
Clojure 1.6 By Default
The project now depends on org.clojure/clojure
version 1.6.0
. It is
still compatible with Clojure 1.4 and if your project.clj
depends on
a different version, it will be used, but 1.6 is the default now.
We encourage all users to upgrade to 1.6, it is a drop-in replacement for the majority of projects out there.
Changes Between 1.0.0-beta6 and 1.0.0-beta7
Retain Default Change
When publishing, retain
now defaults to false
,
which is a much more sensible default.
Contributed by Martin Trojer.
Change Log
Machine Head change log is available on GitHub.
Machine Head is a ClojureWerkz Project
Machine Head is part of the group of Clojure libraries known as ClojureWerkz, together with
- Langohr, a Clojure client for RabbitMQ that embraces the AMQP 0.9.1 model
- Elastisch, a minimalistic Clojure client for ElasticSearch
- Monger, a Clojure MongoDB client for a more civilized age
- Cassaforte, a Cassandra client built around CQL 3
- Neocons, a feature rich Clojure client for Neo4J REST API
and several others. If you like Machine Head, you may also like our other projects.
Let us know what you think on Twitter or on the Clojure mailing list.
About the Author
Michael on behalf of the ClojureWerkz Team