Version 1.0.3 released

This is a bugfix release.

Broker

  • Fix loading of psk files.
  • Don't return an error when reloading config if an ACL file isn't defined.  This was preventing psk files being reloaded.
  • Clarify meaning of $SYS/broker/clients/total in mosquitto(8) man page.
  • Clarify meaning of $SYS/broker/messages/stored in mosquitto(8) man page.
  • Fix non-retained message delivery when subscribing to #.
  • Fix retained message delivery for subs to foo/# with retained messages at foo.
  • Include the filename in password/acl file loading errors.

Library

  • Fix possible AttributeError when self._sock == None in Python module.
  • Fix reconnecting after a timeout in Python module.
  • Fix reconnecting when there were outgoing packets in the queue in the Python module.
  • Fix problem with mutex initialisation causing crashes on some Windows installations.

Source is available on the download page, the binary packages for Windows are available now and Linux builds will be available as soon as the various build servers complete their tasks.


Baby

baby

I've recently become a father, so please don't be offended if I take a while to respond to any mosquitto related queries.


Version 1.0.2 released

This is a bugfix release.

Broker

  • If the broker was configured for persistence, a durable client had a subscription to topics in $SYS/# and had messages in its queue when the broker restarted, then the persistent database would have messages missing and so the broker would not restart properly. This has been fixed.

Library

  • Fix threading problem on some systems.

Tests

  • Close socket after 08-ssl-connect-no-auth-wrong-ca.py test to prevent
  • subsequent tests having problems.

Build scripts

  • Install pskfile.example in CMake. Fixes bug #1037504.

Other

  • Fix db_dump parameter printing message store and sub chunks.

Version 1.0.1 released

This is a bugfix release. The important changes are fixing the on_log() callback in the Python module and the log_dest option when running as a Windows service. The rest of the fixes are documentation and build script fixes.

Downloads are available on the download page and include all supported binaries (except for Ubuntu packages which are still waiting to build due to Launchpad maintenance). The Python module has been uploaded to Python Package Index.

Broker

  • Fix default log_dest when running as a Windows service.

Client library

* Fix incorrect parameters in Python on_log() callback call. Fixes bug #1036818.

Clients

  • Clients now don't display TLS/TLS-PSK usage help if they don't support it.

Build scripts

  • Fix TLS-PSK support in the CMake build files.
  • Fix man page installation in the CMake build files.
  • Fix SYSCONFDIR in cmake on *nix when installing to /usr. Fixes bug #1036908.

Documentation

* Fix mqtt/MQTT capitalisation in man pages. * Update compiling.txt. * Fix incorrect callback docs in mosquitto.py. Fixes bug #1036607. * Fix various doc typos and remove obsolete script. Fixes bug #1037088.


Bugfix coming soon...

A few bugs have been identified with the 1.0 release; thanks to everyone who has got in touch about it. They're mostly documentation/build script mistakes (see ChangeLog.txt), but there is a Python bug that makes it worthwhile making a quick bugfix release.

I intend to make the release this evening (in around 8 hours from this post), so if you have anything you think needs fixing please try and get in touch before then.


Version 1.0 released

This is a feature and bugfix release. This is the most significant release for the mosquitto project so far. It encompasses >20% of the total commits for the project and has an increase in source tarball size of 95%, mostly down to the new bundled tests and new man pages. It introduces lots of new features for the broker and improves the API of the client libraries, although this does mean that the libraries are incompatible with previous releases. I apologise for this and hope you'll agree that the changes are worth it.

I've been overwhelmed with the amount of feedback that I've received recently, thanks to everyone that has got in touch to let me know where something could be improved. I'd particularly like to thank Nicholas Humfrey for setting me on the continuous integration path.

On a slightly different note, my wife was expecting our first child two days ago so it's quite likely I'll be less responsive to support requests for a little while.

Significant changes

These are what I think are the exciting changes for this release.

  • SSL/TLS support across the board - the broker, client libraries and pub/sub clients. This provides certificate based network encryption in a very similar manner to SSL in a web browser where the client verifies that the server is valid. It is also possible to use client certificates to authenticate the clients with the server.
  • TLS-PSK support (not on Python). This is "pre-shared-key" network encryption and represents a simpler encryption interface than certificate based encryption which makes it much more suitable for embedded/constrained devices.
  • The Python client library is now written in pure Python so is much easier to use. It supports Python 2.6, 2.7 and 3.* (no SSL support for 2.6).
  • All client libraries have had their interface overhauled and should now be much saner and straightforward to use.
  • The client libraries have thread support.
  • Passwords files for the broker are stored hashed and salted and a utility for maintaining them has been provided.
  • It is now possible to write access and authentication plugins for the broker for providing custom support for authentication against e.g. a SQL database.
  • Implementation of a good test suite which has lead to improved protocol compliance amongst other bug fixes.
  • Masses of bug fixes.

Downloads

Source is available on the download page, the binary packages will follow as soon as possible. Windows and Ubuntu packages are currently available, more to follow.

Changes

The complete list of changes is below:

The broker

  • Add SSL/TLS support.
  • Add TLS-PSK support, providing a simpler encryption method for constrained devices.
  • Passwords are now salted+hashed if compiled with WITH_TLS (recommended).
  • Add mosquitto_passwd for handling password files.
  • Add $SYS/broker/publish/messages/{sent|received} to show the number of PUBLISH messages sent/received.
  • Add $SYS/broker/publish/bytes/{sent|received} to show the number of PUBLISH bytes sent/received.
  • Add reload parameter for security init/cleanup functions.
  • Add option for expiring disconnected persistent clients.
  • Add option for queueing of QoS 0 messages when persistent clients are disconnected.
  • Enforce client id limits in the broker (only when WITH_STRICT_PROTOCOL is defined).
  • Fix reloading of log configuration.
  • Add support for try_private config option for bridge connections.
  • Add support for autosave_on_changes config option.
  • Add support for include_dir config option.
  • Add support for topic remapping.
  • Usernames were being lost when a non clean-session client reconnected, potentially causing problems with ACLs. This has been fixed.
  • Significant improvement to memory handling on Windows.
  • Bridges with outgoing topics will now set the retain flag correctly so that messages will be retained on the remote broker.
  • Incoming bridge connections are now detected by checking if bit 8 of the protocol version number is set. This requires support from the remote broker.
  • Add support for notification_topic option.
  • Add $SYS/broker/subscriptions/count and $SYS/broker/retained messages/count.
  • Add restart_timeout to control the amount of time an automatic bridge will wait before reconnecting.
  • Overlapping subscriptions are now handled properly. Fixes bug #928538.
  • Fix reloading of persistence_file and persistence_location.
  • Fix broker crash on incorrect protocol number.
  • Fix missing COMPAT_ECONNRESET define on Windows.
  • Clients that had disconnected were not always being detected immediately on Linux. This has been fixed.
  • Don't save $SYS messages to the on-disk persistent db. All $SYS messages should be reconstructed on a restart. This means bridge connection notifications will now be correct on a restart.
  • Fix reloading of bridge clients from the persistent db. This means that outgoing bridged topics should always work.
  • Local bridges are now no longer restricted by local ACLs.
  • Discard publish messages with zero length topics.
  • Drop to "mosquitto" user even if no config file specified.
  • Don't incorrectly allow topic access if ACL patterns but no normal ACL rules are defined.

The client libraries

  • Add SSL/TLS support.
  • Add TLS-PSK support, providing a simpler encryption method for constrained devices.
  • Add javascript/websockets client library.
  • Add struct mosquitto *mosq parameter for all callbacks in the client library. This is a binary incompatible change so the soversion of the libraries has been incremented. The new parameter should make it easier to use callbacks in practice.
  • Add mosquitto_want_write() for use when using own select() loop with mosquitto_socket().
  • Add mosquitto_connect_async() to provide a non-blocking connect client call.
  • Add mosquitto_user_data_set() to allow user data pointer to be updated.
  • Add "int rc" parameter to disconnect callback to indicate whether disconnect was unexpected or the result of calling mosquitto_disconnect().
  • Add mosquitto_strerror() for obtaining a string description of error numbers.
  • Add mosquitto_connack_string() for obtaining a string description of MQTT connection results.
  • Add mosquitto_will_clear() and change mosquitto_will_set() to only set the will.
  • Add mosquitto_sub_topic_tokenise() and mosquitto_sub_topic_tokens_free() utility functions to tokenise a subscription/topic string into a string array.
  • Add mosquitto_topic_matches_sub() to check whether a topic matches a subscription.
  • Replaced mosquitto_log_init() with mosquitto_log_callback_set() to allow clients to decide what to do with log messages.
  • Client will now disconnect itself from the broker if it doesn't receive a PINGRESP in the keepalive period after sending a PINGREQ.
  • Client will now send a PINGREQ if it has not received a message from the broker in keepalive seconds.
  • mosquitto_new() will now generate a random client id if the id parameter is NULL.
  • Added max_packets to mosquitto_loop(), mosquitto_loop_read() and mosquitto_loop_write() to control the maximum number of packets that are handled per call.
  • Payload parameters are now void * instead of uint8_t *.
  • The clean_session parameter has been moved from mosquitto_connect() to mosquitto_new() because it is a client parameter rather than a connection parameter.
  • Functions now use int instead of uint*_t where possible.
  • mosquitto_new() now sets errno to indicate failure type.
  • Return MOSQ_ERR_INVAL on zero length topic.
  • Fix automatic client id generation on Windows.
  • mosquitto_loop_misq() can now return MOSQ_ERR_NO_CONN.
  • Compile static library as well as dynamic library with default makefiles.
  • Rename C++ namespace from mosquittopp to mosqpp to remove ambiguity.
  • C++ lib_init(), lib_version() and lib_cleanup() are now in the mosqpp namespace directly, not mosquittopp class members.
  • The Python library is now written in pure Python and so no longer depends on libmosquitto.
  • The Python library includes SSL/TLS support.
  • The Python library should now be compatible with Python 3.

Other

  • Fix db_dump reading of retained messages.
  • Add example of logging all messages to mysql.
  • Add C++ client example.
  • Fix potential buffer overflow in pub/sub clients.
  • Add "make binary" target that doesn't make documents.
  • Add --help arguments to pub/sub clients.
  • Fix building on Solaris.

Upcoming release

The next release of mosquitto is approaching. There is currently only one feature left on the todo list to complete and I've pencilled in the end of the month as the release date. The date may slip a week or two after that depending on any bugs reported.

Despite the development being carried out in the 0.16 branch and the current in-development version numbers being 0.15.90, this will be version 1.0 of mosquitto. There has been significant API changes (now a lot more sane hopefully) which means the client library interface version has been incremented, and the number of changes involved in this release far outreach any previous release, including SSL support, a pure Python client implementation, a healthy start on tests and an associated improvement in protocol compliance, and threaded client support. I think it is well worthy of the version number.

I am, however, very keen that this be as bug free a release as possible. To this end, if you're a mosquitto user I'd be very appreciative if you'd download the current source code and give it a try. Maybe read through the documentation and check it makes sense

The source for the current version is at either of these links (ignore the "0.16", that is just the branch name):

If you want to test but with a minimum amount of effort, please download the source, run "make test" and report back any problems. This would be particularly  useful if you are using something other than a Debian/Ubuntu/openSUSE based Linux. If you have any problems, bugs can be reported at https://launchpad.net/mosquitto, by leaving a comment or by getting in touch directly. I'm interested in anything, but would be especially keen to hear from you if you think something to do with the client API needs changing.

Thanks in advance!


SSL support on Test Server

The next version of Mosquitto will provide SSL support for network encryption and authentication. This work is still in development, but is sufficiently advanced to make available for testing on test.mosquitto.org. In addition to the existing unencrypted access via port 1883, connections are now possible on ports 8883 and 8884.

Port 8883 provides simple encrypted access. Your client should verify the server certificate using the CA certificate available at http://test.mosquitto.org/ssl/mosquitto.org.crt

Port 8884 uses the same server certificate, but requires that your client provide a valid certificate signed by the mosquitto.org CA key. If you wish to obtain a client certificate for testing purposes, please get in touch.

The development Python module provides client SSL support. The latest version is available at mosquitto.py with a simple example at ssub.py. You will need to place the mosquitto.org CA certificate linked above in the same directory. All versions of Python from 2.7 upwards (including Python 3) are supported.

Please get in touch if you have any problems.

Update:

All clients in the development version now support SSL.


IPv6 on Test Server

The public Mosquitto test server, test.mosquitto.org has supported IPv6 since it was originally put online but the required DNS record was missing. This has now been fixed so once the record has propagated across the internet you should be able to test your IPv6 clients.