FlashMQ 1.8.0 introduces three new features:
- TLS x509 client verification.
- Hot listener reconfiguration on config reload (SIGHUP).
- Releasing memory back to the operating system on signal SIGUSR2.
X509 client verification
With x509 client verification, the MQTT username is taken from the ‘common name (CN)’ field of the x509 client certificate. With the options
client_verification_ca_file you can point to the certificate authority that signs your client certificates.
X509 client verification allows better integration with manufacturing of IoT devices for instance, because it allows devices to be authorized in an external process, like a factory.
Hot listener reloading
Previously, to change your listener configuration, a restart was required. It is now possible to alter your listener configuration on the fly with a config reload. The previous listeners are replaced with the new ones as defined in the configuration file. Existing clients are unaffected by the reload.
Releasing memory with malloc_trim(0)
It has been observed that programs, especially multi-threaded programs, can have a high memory consumption because of how glibc manages thread cache and malloc arenas. See for instance Abnormal memory usage with glibc 2.31 related to thread cache and trimming strategy. This is actually unused memory which is not reused well by the running application.
Running with a plugin can make this problem extra apparent.
FlashMQ now listens to signal SIGUSR2. When received (with
kill) it calls
malloc_trim(0) to give this memory back to the operating system.
It’s not meant to be used on a regular basis, but it’s convenient to have.