Releases: mochi-mqtt/server
v2.6.6
v2.6.5
What's Changed
- add description for MaximumClientWritesPending by @CendealChen in #411
- use cl.ID instead of pk.Connect.ClientIdentifier when looking for existing clients in inheritClientSession by @SimonMacIntyre in #417
New Contributors
- @CendealChen made their first contribution in #411
- @SimonMacIntyre made their first contribution in #417
🥳
Full Changelog: v2.6.4...v2.6.5
v2.6.4
v2.6.3
What's Changed
- add 0x04 Reason Code functionality by @dgduncan in #395
- Update README example to reflect new listeners API by @thedevop in #389
- Add logging level file config by @dgduncan in #396
- Bump golang.org/x/net from 0.17.0 to 0.23.0 by @dependabot in #388
- Bypassing asdine/storm and directly using bbolt. by @werbenhu in #392
Lots of good updates, with many thanks to @dgduncan @werbenhu @thedevop!
Full Changelog: v2.6.2...v2.6.3
v2.6.2
v2.6.1
v2.6.0
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
.
- As a result of this change, the docker image now requires a configuration file to be specified with the parameter
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:
- If you use file-based configuration, you can only have one of each hook type.
- 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.
- 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
v2.4.6
What's Changed
- Replace DefaultServerCapabilities with NewDefaultServerCapabilities()… by @thedevop in #360, resolving data races in tests.
- Only pass a copy of system.Info to hooks by @thedevop in #365, resolves #364 and race conditions in hooks that call system.Info directly.
- Allow configurable max stored qos > 0 messages by @thedevop in #359, resolves #340, in which inflight messages were mismatched against the client message quota, causing a performance bottleneck.
Many thanks @thedevop!
Full Changelog: v2.4.5...v2.4.6
v2.4.5
v2.4.4
What's Changed
- Fix data race issue with write buffer by @thedevop in #347
- Packet encoding optimization by @thedevop in #343, which should provide small but meaningful performance improvements at scale.
- feat: return tcp.Address from listener, if exists by @AeroNotix in #336, to correctly allow use of port 0 for random port assignments.
- Move cl.WriteLoop() to attachClient() and call cl.Stop() in loadClients() to update client.State. by @werbenhu in #344, to prevent goroutine leaks.
New Contributors
- @AeroNotix made their first contribution in #336
Full Changelog: v2.4.3...v2.4.4