github mochi-mqtt/server v2.6.0

latest releases: v2.6.3, v2.6.2, v2.6.1...
one month ago

What's Changed

Be advised - this release includes a breaking change for the Docker image which may be fixed in the future.

  • Bump google.golang.org/protobuf from 1.28.1 to 1.33.0 by @dependabot in #372
  • Add BadgerDB garbage collection. by @werbenhu in #371, which prevents the Badger log file from growing infinitely, resolving issues #370, #369, and #363
  • Implement File based configuration by @mochi-co in #351, which adds a file-based configuration allowing server options, hooks, and listeners to be configured by yaml or json file.
    • As a result of this change, the docker image now requires a configuration file to be specified with the parameter-v $(pwd)/config.yaml:/config.yaml.

File Based Configuration

You can use File Based Configuration with either the Docker image (noted above), or by running the build binary with the --config=config.yaml or --config=config.json parameter.

Configuration files provide a convenient mechanism for easily preparing a server with the most common configurations. You can enable and configure built-in hooks and listeners, and specify server options and compatibilities:

listeners:
  - type: "tcp"
    id: "tcp12"
    address: ":1883"
  - type: "ws"
    id: "ws1"
    address: ":1882"
  - type: "sysinfo"
    id: "stats"
    address: ":1880"
hooks:
  auth:
    allow_all: true
options:
  inline_client: true

Please review the examples found in examples/config for all available configuration options.

There are a few conditions to note:

  1. If you use file-based configuration, you can only have one of each hook type.
  2. You can only use built in hooks with file-based configuration, as the type and configuration structure needs to be known by the server in order for it to be applied.
  3. You can only use built in listeners, for the reasons above.

If you need to implement custom hooks or listeners, please do so using the traditional manner indicated in cmd/main.go.

Full Changelog: v2.4.6...v2.6.0

Don't miss a new server release

NewReleases is sending notifications on new releases.