10 Commits

Author SHA1 Message Date
Cendeal
dc272d2c36 add description for MaximumClientWritesPending(#410) (#411) 2024-07-30 19:02:32 +01:00
werben
b26e03a433 Bypassing asdine/storm and directly using bbolt. (#392)
* Fix the bug where inline subscribers do not receive messages after all non-inline clients unsubscribe.

* Bypassing asdine/storm and directly using bbolt.

* Fixed erroneous removal of FileContributor.

---------

Co-authored-by: JB <28275108+mochi-co@users.noreply.github.com>
2024-04-30 10:03:22 +01:00
thedevop
d5d9b02b28 Update README example to reflect new listeners API (#389)
* Update README example to reflect new listeners API

* Update README example to reflect new listeners API

---------

Co-authored-by: JB <28275108+mochi-co@users.noreply.github.com>
2024-04-30 09:03:34 +01:00
werben
d048e4bef7 Add a persistence hook based on cockroachdb/pebble. (#378)
* Implementing Pebble as a persistence database hook.

* Fixed failing test cases.

* Add Pebble DB configuration for file-based configuration, optimize part of the code.

* Resolve test failure issues and perform code optimization.

* Optimized the test cases.
2024-03-28 10:02:18 +00:00
werben
47162a3770 Translate README.md into Chinese version. (#373) 2024-03-18 11:11:31 +00:00
werben
b2ab984949 Move cl.WriteLoop() to attachClient() and call cl.Stop() in loadClients() to update client.State. (#344)
* Moving go cl.WriteLoop() out of NewClient() and placing it in server.attachClient().

* Call cl.Stop() to cancel the context, update cl.State with information such as disconnected time, and set the stopCause.

* update README-CN.md

---------

Co-authored-by: JB <28275108+mochi-co@users.noreply.github.com>
2023-12-22 00:34:29 +00:00
Naohiro Heya
e8f151bf1f Add a Japanese version of README.md (#338)
* Add a Japanese version of README.md

* add jp link
2023-12-03 10:04:04 +00:00
Marco Debus
4c0c862dcd Fix for unlimited maximum message expiry interval (#315)
* fix when no max msg expiry interval is set

* fix expiry handling of clearExpiredInflights

* Modify it to handle cases where the MaximumMessageExpiryInterval is set to 0 or math.MaxInt64 for no expiry, and optimize some of the code and test cases.

* Set MaximumMessageExpiryInterval to 0 or math.MaxInt64 for no expiration, and optimize some of the code and test cases.

* Addressing the issue of numeric overflow with expiration values.

* Only when server.Options.Capabilities.MaximumMessageExpiryInterval is set to math.MaxInt64 for no expiry.

* fix typo in README.md

* There is no need to verify whether 'maximumExpiry' is 'math.MaxInt64' within 'client.ClearInflight()

* Optimize the code to make it easier to understand.

* Differentiate the handling of 'expire' in MQTTv5 and MQTTv3; skip expiration checks if MaximumMessageExpiryInterval is set to 0; optimize code and test cases.

* When MaximumMessageExpiryInterval is set to 0, it should not affect the message's own expiration(for v5) evaluation.

* Adding client.ClearExpiredInflights() to clear expired messages, while client.ClearInflights() is used to clear all inflight messages.

---------

Co-authored-by: JB <28275108+mochi-co@users.noreply.github.com>
Co-authored-by: werben <werben@aliyun.com>
Co-authored-by: werben <werben@qq.com>
2023-10-21 12:10:02 +01:00
werbenhu
11e0256959 update README-CN.md (#312) 2023-10-03 20:45:34 +01:00
werbenhu
2b0732b815 Add a Chinese version of README.md. (#307)
* Add a Chinese version of the README.md.

* rename README_CN.md to README-CN.md

* Optimize some aspects

* Correct some translation errors.

* Optimize some aspects.

* Initial completion of all translations.

* Optimize some aspects.

* Optimize some aspects.

* Refinement of translations.
2023-10-01 21:44:15 +01:00