Version 0.14.3 released

This is a bugfix release.

  • Fix potential crash when client connects with an invalid CONNECT packet.
  • Fix incorrect invalid socket comparison on Windows.
  • Server shouldn't crash when a message is published to foo/ when a subscription to foo/# exists (bug #901697).
  • SO_REUSEADDR doesn't work the same on Windows, so don't use it.
  • Cygwin builds now support Windows service features.
  • Fix $SYS/broker/bytes/sent reporting.

Version 0.14 released

This is a fairly minor feature release. The major changes are the pattern matching ACL support, the support for running directly as a Windows service and the change to the network code to attempt to send packets immediately. The Windows binary is now supplied as an installer rather than a zip file.

  • Add support for matching ACLs based on client id and username.
  • Add a Windows installer file (NSIS based).
  • Add native support for running the broker as a Windows service. This is the default when installed using the new installer.
  • Fix client count for listeners. When clients disconnect, decrement the count. Allow max_connections to work again.
  • Attempt to send all packets immediately upon being queued. This will result in more immediate network communication in many cases.
  • Log IP address when reporting CONNACK packets if the client id isn't yet known.
  • Fix payload length calculation in python will_set function.
  • Fix Python publish and will_set functions for payload=None.
  • Fix keepalive value being lost when reconnecting a client (bug #880863).
  • Persistence file writing now uses portable file functions, so the Cygwin broker build should no longer be necessary.
  • Duplicate code between the client and broker side has been reduced.
  • Queued messages for clients reconnecting with clean_session=false set were not being sent until the next message for that client was received. This has been fixed (bug #890724).
  • Fix subscriptions to # incorrectly matching against topics beginning with /

Android MQTT example project

To celebrate the news that the IBM Java MQTT client implementation will be released as open source, I've put together a simple Android example based on the MQTT service code written by Dale Lane. I'm a beginner at both Java and Android, so expect it to be a bit rough.

The example displays incoming payload text on a text label. It's a complete project that you can build and install on your phone with only a few small changes - search for "CHANGE ME" in src/org/mosquitto/android/mqtt/MQTTDemo.java.

To get the project working, assuming you've already installed the android sdk, first get the IBM Java library (see http://mqtt.org/software) and put it in <project dir>/lib then do the following:

android update project -p &lt;path to project&gt;
# If the update complains about build.xml - delete it and run again
cd &lt;path to project&gt;
ant debug
sudo adb start-server
ant installd

I'll not be at all surprised if there are problems in the project due to different sdk or tool versions. Please comment if you find a problem.

The project is available from http://mosquitto.org/files/examples/android-mqtt-example.zip. Until the IBM Java implementation is open source please be aware of the licence attached to it.

Thanks to Dale for the core Android MQTT service implementation.


IBM Java and C clients to be open source

The web is currently buzzing with the announcement yesterday that IBM and Eurotech are donating MQTT to the Eclipse Foundation. One part of this is the new Machine to Machine Working Group, again part of Eclipse. Another much more significant part has been released as part of a new Eclipse open source project Paho, which is in the proposal stage.

The exciting part is the "Initial contributions" section which states "The initial code contribution to Paho will include  Java and C client-side implementations the MQTT protocol, contributed by IBM. "

It looks like the code will be licensed under the EPL (Eclipse Public License). This is particularly exciting because there is currently no solid freely available and usable implementation of MQTT in Java.

Well done everyone at IBM for making this happen. Roll on the end of November!

Update:

This post on mqtt.org explains what the various announcements mean more clearly: http://mqtt.org/2011/11/eclipse-paho-open-source-and-other-news

Update 2:

Andy Piper's blog post covers things even better, along with clearing up some of the confusions from the news releases: http://andypiper.co.uk/2011/11/04/mqtt-goes-free-a-personal-qa/


Two!

Today (just) marks the 2nd birthday of the mosquitto project. In the past year mosquitto has undergone pretty substantial changes and improvements. Some highlights from the year:

  • Move away from using sqlite to store data in memory and on disk, resulting in a much more compact, better performing and more elegant broker
  • Windows native port
  • MQTT 3.1 support
  • Greatly improved Python module
  • Getting really close to being feature complete with respect to RSMB
  • Being packaged in Debian...
  • ... and Ubuntu
  • The mosquitto client code being used by Facebook in their iphone app
  • The numerous bugs reported, bugfixes, suggestions and general interest displayed by people. Thanks everyone!

Mosquitto has gone from version 0.8.3 to 0.13 - so what about next year? This will be the year when 1.0 is released. The bar I'm setting is complete RSMB features, with the exception of some of the more esoteric ones. At the moment this means there are still some of the bridge features to implement and complete configuration reloading. I'm also going to have a much improved Windows port so there will be no need for a separate Cygwin version. At the same time I'm making a Windows installer and allowing mosquitto to be installed as a proper Windows service. This work should all be in 0.14. Another point for improvement is the Python module - it could be more Pythonic than it is now. My current plan is to have it throw exceptions rather than return integer error values but I could do with the help of a Python expert really.

All in all I think it should be a good year.


Version 0.13 released

This release brings some new features and fixes. Although there are no real "killer features", this release does include some fairly significant updates. Of particular note are the fixes to subscription wildcard matching, which now meets the spec in all cases, the Python payload parameter being a Python string which should make life lots easier for Python developers, the non clean-session client fixes and related persistent database fixes.

  • Implement bridge state notification messages.
  • Save client last used mid in persistent database (DB version number bumped).
  • Expose message id in Python MosquittoMessage.
  • It is now possible to set the topic QoS level for bridges.
  • Python MosquittoMessage payload parameter is now a Python string, not a ctypes object which makes it much easier to use.
  • Fix queueing of messages for disconnected clients. The max_queued_messages option is now obeyed.
  • C++ library is now in its own namespace, mosquittopp.
  • Add support for adding log message timestamps in the broker.
  • Fix missing mosquitto_username_pw_set() python binding.
  • Fix keepalive timeout for reconnecting non clean-session clients. Prevents immediate disconnection on reconnection.
  • Fix subscription wildcard matching - a subscription of +/+ will now match against /foo
  • Fix subscription wildcard matching - a subscription of foo/# will now match
  • against foo
  • When restoring persistent database, clients should be set to non clean-session or their subscriptions will be immediately removed.
  • Fix SUBACK payload for multiple topic subscriptions.
  • Don't send retained messages when a client subscribes to a topic it is already subscribed to.