mochi-co
605bb93c75
Move msgToPacket to storage.Message.ToPacket
2023-04-21 21:49:49 +01:00
Wind
c73ace2ea0
Simplified code ( #195 )
...
Simplify the code for the loadInflight and loadRetained methods.
Adjust the validation order of the processSubscribe method to ensure that it fails quickly if there is an error, since s.hooks. OnACLCheck generally takes a long time.
Co-authored-by: JB <28275108+mochi-co@users.noreply.github.com >
2023-04-21 21:29:03 +01:00
thedevop
aac6d699da
Ensure to close client WriteLoop ( #193 )
...
* Ensure client WriteLoop is closed
* Ensure to close client WriteLoop
2023-04-21 21:20:46 +01:00
mochi-co
b188055c7d
Update server version
2023-03-11 23:14:51 +00:00
JB
aaf1d9d4c6
Configurable client bufio reader/writer sizes ( #190 )
2023-03-11 23:13:28 +00:00
mochi-co
44ce819318
Update server version
2023-02-28 20:58:05 +00:00
thedevop
da79faa972
Skip expire cleanup for isTakenOver session ( #183 )
...
* Skip expire cleanup for isTakenOver session
* Set prev connection to isTakenOver on CleanSession
#173 .
2023-02-28 20:53:26 +00:00
JB
9b7a943888
Correctly identify and clean taken-over sessions ( #180 )
2023-02-25 01:24:17 +00:00
mochi-co
0851b09e4d
Update server version
2023-02-22 23:06:22 +00:00
thedevop
a302c9dd88
Use *packets.Packet for outbound chan ( #176 )
...
* Use *packets.Packet for outbound chan
* Use *packets.Packet for outbound chan
* Use *packets.Packet for outbound chan
2023-02-22 23:02:44 +00:00
mochi-co
1e8f922102
update server version
2023-02-20 18:14:57 +00:00
mochi-co
49cada4fbc
Update server version
2023-02-10 23:39:27 +00:00
JB
ef34510c0b
Expose dropped publish messages count in sys info ( #170 )
2023-02-10 23:38:20 +00:00
JB
e5716caad1
Fix potential NextPacketID endless loop, expand tests ( #169 )
...
* Fix possible NextPacketID endless loop, expand tests
* Optimize NextPacketID
* Use math constants
2023-02-10 23:27:21 +00:00
thedevop
4b039cb35c
Add PublishDropped metrics ( #167 )
...
* Add PublishDropped
* Add PublishDropped
* Add PublishDropped
* Update storage_test.go
* Update system.go
* Update server.go
2023-02-10 14:44:01 +00:00
JB
aac245441a
No longer issue retained messages on session takeover ( #166 )
2023-02-09 23:57:24 +00:00
JB
bb54cc68e6
Client write buffers ( #165 )
...
* Replace fanpool with client write buffers
2023-02-09 22:34:30 +00:00
mochi-co
ca849131eb
Update server version
2023-02-05 11:07:07 +00:00
Wind
ba7e534122
failed to delete inflight data ( #162 )
...
The s.hooks.OnQosPublish method needs to be called, otherwise the following s.hooks.OnQosComplete or processPuback(s.hooks.OnQosComplete) method will report a data not found error.
2023-02-05 10:53:49 +00:00
mochi-co
db760c34a5
Update server version
2023-02-04 10:57:27 +00:00
JB
ae3ee81bb4
Rename Quota methods for clarity ( #159 )
2023-02-04 10:53:45 +00:00
Wind
8dec9cc962
invalid config type provided ( #152 )
...
* invalid config type provided
examples/persistence/bolt/main.go: invalid config type provided
* fixed ErrReceiveMaximum(receive maximum exceeded)
No quotas of the inflight is set in the readStore method, so each quota is equal to 0. The inheritClientSession method overrides the quotas of the new client inflight, so the processPublish method reports an ErrReceiveMaximum and disconnects the client.
* reset receive quota
receive quota should be reset across connections (as specified in the spec).
2023-02-04 10:06:26 +00:00
mochi-co
f90e52328d
Update server version
2023-01-16 20:08:55 +00:00
JB
50aae47618
Publish retained messages only after connack ( #147 )
2023-01-16 19:50:01 +00:00
JB
300152413c
Ignore retain as published v3 ( #142 )
...
* Optimise Capabilities struct alignment
* Only use RetainAsPublished for v5 clients
2023-01-13 23:38:49 +00:00
mochi-co
0de1d731db
Update version number
2023-01-10 00:01:21 +00:00
JB
80746abc52
Use correct connack return codes for MQTTv3 ( #140 )
2023-01-10 00:00:43 +00:00
mochi-co
a73cf4ca0e
Update server version
2023-01-09 23:08:49 +00:00
mochi-co
c464b46713
export client.Net.Conn for external use
2023-01-09 22:49:40 +00:00
mochi-co
05ce56008c
Small code improvements
2023-01-09 22:49:20 +00:00
mochi-co
4ae58b79e3
Update server version
2023-01-07 20:13:48 +00:00
thedevop
b895d688e0
Change inline check order ( #133 )
2023-01-07 20:02:05 +00:00
mochi-co
cdb44990cf
Update version number
2023-01-07 17:30:58 +00:00
mochi-co
1adb02e087
Update readme and server version
2022-12-21 20:47:58 +00:00
JB
e31840a37d
Optimize inflight expiry ( #127 )
...
* Small formatting/style changes for filter existed
* Use OnQoSDropped hook instead of onInflightExpired
2022-12-21 19:44:25 +00:00
Wind
bb9f937bb0
Variable existed in the method processSubscribe is unstable
...
The variable existed can be changed repeatedly within a for loop. An array variable must be used to record the subscription of each filter.
2022-12-18 13:46:06 +08:00
JB
75504ff201
Update server version
2022-12-16 18:27:29 +00:00
Wind
a556feb325
Add the OnUnsubscribed hook to the unsubscribeClient method ( #122 )
...
Add the OnUnsubscribed hook to the unsubscribeClient method,and change the unsubscribeClient to externally visible. In a clustered environment, if a client is disconnected and then connected to another node, the subscriptions on the previous node need to be cleared.
2022-12-16 18:23:58 +00:00
JB
8d4cc091b4
Update version number
2022-12-16 00:31:59 +00:00
JB
d8f28cb843
Enforce server max packet ( #121 )
...
* Enforce Server Maximum Packet Size on client read
* Fix tests
2022-12-16 00:30:23 +00:00
mochi-co
4f198a99dd
Fix mis-typed onpublished hook, update version, fanpool defaults
2022-12-15 18:19:02 +00:00
mochi-co
fe5d9ffa61
Simplify Client construction, add NewClient method to Server, add Publish convenience method
2022-12-12 11:37:19 +00:00
mochi-co
8a04648c09
Cleanup godoc formatting
2022-12-11 21:38:01 +00:00
mochi-co
74ed8cd046
Update go mod and imports to v2
2022-12-11 11:50:44 +00:00
mochi-co
898c90d4ca
Rewrite everything from scratch for mqtt v5
2022-12-10 21:49:32 +00:00