LogoLogo
2.1.0
2.1.0
  • Welcome
  • Getting Started
  • Downloads
  • VerneMQ / MQTT Introduction
  • Installing VerneMQ
    • Installing on Debian and Ubuntu
    • Installing on CentOS and RHEL
    • Running VerneMQ using Docker
  • Configuring VerneMQ
    • Introduction
    • The VerneMQ conf file
    • Schema Files
    • Auth using files
    • Auth using a database
    • MQTT Options
    • MQTT Listeners
    • HTTP Listeners
    • Non-standard MQTT options
    • Websockets
    • Logging
    • Consumer session balancing
    • Plugins
    • Shared subscriptions
    • Advanced Options
    • Storage
    • MQTT Bridge
    • REST Publisher
  • VerneMQ Clustering
    • Introduction
    • Inter-node Communication
    • Dealing with Netsplits
  • Live Administration
    • Introduction
    • Inspecting and managing sessions
    • Retained messages
    • Live reconfiguration
    • Managing Listeners
    • Certificate Management
    • HTTP API
    • Tracing
    • Output Format
  • Monitoring
    • Introduction
    • $SYSTree
    • Graphite
    • Netdata
    • Prometheus
    • Health Checker
    • Status Page
  • Plugin Development
    • Introduction
    • Session lifecycle
    • Subscribe Flow
    • Publish Flow
    • Enhanced Auth Flow
    • Erlang Boilerplate
    • Lua Scripting Support
    • Webhooks
  • Misc
    • Loadtesting VerneMQ
    • Not a tuning guide
    • Change Open File Limits
  • Guides
    • A typical VerneMQ deployment
    • VerneMQ on Kubernetes
    • Loadtesting VerneMQ
    • Clustering during development
    • Not a tuning guide
    • Change Open File Limits
    • Migrating to 2.0
Powered by GitBook
On this page
  • Error Logger
  • Removed Features
  • on_deliver hook
  • Credentials obfuscation
  • General note

Was this helpful?

Edit on GitHub
Export as PDF
  1. Guides

Migrating to 2.0

Release 2.0.0 has a small number of minor incompatibilities:

Error Logger

VerneMQ now uses the internal logger library instead of the lager library. It's best for your custom VerneMQ plugins to do the same and replace the lager log calls with internal log statements. Instead of using lager:error/2, you can use the following format:

?LOG_ERROR("an error happened because: ~p", [Reason]).   % With macro
logger:error("an error happened because: ~p", [Reason]). % Without macro

To use the Logger Macros, add this include line to your module: -include_lib("kernel/include/logger.hrl").

Removed Features

  • The multiple sessions feature has been fully removed. (you are likely not affected by this)

  • Compatibility to and old (v0.15) subscriber format was removed. (you are likely not affected by this)

on_deliver hook

The on_deliver hook now has a Properties argument like the on_deliver_m5 hook. This changes the function arity from on_deliver/6 to on_deliver/7. You can ignore the Properties argument in your on_deliver hook implementation, but you'll have to adapt the function definition, by adding a variable similar to:

on_deliver(UserName, SubscriberId, QoS, Topic, Payload, IsRetain, _Properties) ->
 ...

Credentials obfuscation

VerneMQ now uses internal credentials obfuscation, using the following library: https://github.com/rabbitmq/credentials-obfuscation/. This avoids passwords in stacktraces and/or logs. Your own authentication plugins might need adaptation since you want to de-encrypt the password "at the last moment". You can check examples of how the internal VerneMQ auth plugins were adapted to make acredentials_obfuscation:decrypt(Password) call to check for a potentially encrypted password before given it to the database to check.

General note

Some settings related to logging were adapted a bit, and there are additional settings exposed in the vernemq.conf file. The Linux package installer gives you the choice to use an existing vernemq.conf file, or start with a new template. Depending on the number of settings you have changed, it might be easiest to to move and safe your old vernemq.conf, and then use the new template to re-add your settings.

PreviousChange Open File Limits

Last updated 6 days ago

Was this helpful?