Commit Graph

89 Commits

Author SHA1 Message Date
wei_lilitw 646f13199d fix(broker):fix unix sock file not be removed 2024-05-23 17:22:29 +08:00
wei_lilitw 67594b07ef fix(broker):fix unix sock file not be removed 2024-05-23 17:21:21 +08:00
wei_lilitw 9063c6069c feat(broker):Added pipe socket conditions for different systems 2024-04-19 15:24:14 +08:00
wei_lilitw d50464571e feat(hmq):add windows pipe socket.Use the open source project npipe, which nicely encapsulates the operations of windows pipe and returns the connection type net.Conn. 2024-04-18 17:31:35 +08:00
Lijin 8ddca9bdc3 feat(hmq):Provide handler StartUnixSocketClientListening used to handle the Unix communications (#198)
Co-authored-by: wei_lilitw <wei_lilitw@topsec.com.cn>
2024-04-15 19:03:24 +08:00
zhouyy 48b146d64e feat: update 2024-01-08 18:05:40 +08:00
Scott Joseph Spitler II cdff42698a Removed un-needed log line 2023-12-11 23:04:24 -05:00
Scott Joseph Spitler II 9fc57423db Fixed pubMsg when WillTopic is null
Previously the broker would run and compile, but would throw a runtime panic if the will was null because of GoLang's inline struct operator. Should REALLY consider adding a unit test
2023-12-11 22:53:41 -05:00
chowyu12 e3fa6573f6 Merge pull request #176 from spit4520/master
Added in GET /connections to update restarting node
2023-12-11 15:45:23 +08:00
Scott Joseph Spitler II 4f98faeefc Added in detailed conn client logs
Created new data types to store the last time a message was received from a device along with publishing the last will topic, keepalive time, and credentials over the /connections topic. These were mirrored also over the REST API for synchronous stateful services starting up from a crashed k8s pod or other usecases. Start by subscribing to /connections/+ and then GET /api/v1/connections to get the open connections, if a device connects while you are setting up your state, your messageHandler will handle the setup since it has the same information. This information has been published over  for devices you don't have any control over and for relay purposes. You can take all of the device information and now create a faux client emulating your downstream device, this may sound strange; but I have a usecase for it, a lot of cheap chinese IoT's were not designed for mass production and we have to fix their messages in the cloud before relaying them to our other legacy servers
2023-12-11 02:30:31 -05:00
Husy e9f340c38f fix conn.Close() in function handleConnection (#180)
Co-authored-by: husyhu <husyhu@qq.com>
2023-03-29 09:45:12 +08:00
Lucas Vieira 061b485a3a fix: 🐛 fixes nil pointer dereference (#163)
checks connection type before accessing values #161

Signed-off-by: Lucas Vieira <lucas.engen.cc@gmail.com>
2022-04-26 10:40:45 +08:00
muXxer c53d8f8a0d Fix nil pointer exception in addr logs (#157) 2022-04-09 12:53:43 +08:00
ZhangJian He a85e9904c2 Add addr in broekr log (#146) 2022-04-04 20:41:33 +08:00
ZhangJian He a501565bab Allow publish message by clientId (#147) 2022-04-04 20:41:04 +08:00
chowyu12 bf2b91c535 update: go.mod and go version (#142)
Co-authored-by: zhouyy <zhouyy@ickey.cn>
2022-01-19 11:16:24 +08:00
ZhangJian He 108e934a85 [cleanup] delete comment out code (#137) 2022-01-10 10:59:39 +08:00
ZhangJian He 46b64e5b84 Close conn when read connect packet error (#136) 2022-01-10 10:59:15 +08:00
ZhangJian He ab117be4a8 Allow Broker DisConnect connections by ClientId (#135)
* Allow Broker DisConnect connections by ClientId

* Allow Broker DisConnect connections by ClientId
2022-01-05 11:15:45 +08:00
ZhangJian He 878e7fce3f Rmoeve unnecessary type convert (#134) 2022-01-05 11:15:26 +08:00
muXxer 1d6979189a use locks around client maps (#126)
Co-authored-by: Luca Moser <moser.luca@gmail.com>
2021-08-10 10:46:38 +08:00
TrickIt 068d5e893c fix: close the connection after send connection refused connack packet. (#121) 2021-06-30 14:13:43 +08:00
Michael Stapelberg 524a9af060 retry listening indefinitely (#105)
When starting hmq immediately after booting, the IP address specified in the
--host flag (e.g. --host=10.0.0.217) might not be configured yet.

Without this commit, hmq would try to listen, give up, and then just hang.
With this commit, hmq automatically recovers.
2021-01-11 10:21:02 +08:00
chujiangke 481a61c520 fix (#90) 2020-06-24 15:14:25 +08:00
gerdstolpmann 839041e912 do not expect "Origin" header for websocket connections (#80)
* websocket: do not check the presence of the "Origin" header

* avoid using http.DefaultServeMux
2020-04-04 10:40:12 +08:00
gerdstolpmann 17dac26996 if used as library, allow that the auth and bridge plugins can be set by (#79)
struct, and not only by name
2020-04-03 14:49:50 +08:00
joy.zhou 57fce9c7dc Update broker.go 2019-12-25 17:12:07 +08:00
joy.zhou 44fa819f62 update some logic 2019-11-14 11:09:15 +08:00
joy.zhou a3fc611615 fix issue 2019-09-30 11:04:46 +08:00
joy.zhou 69a26f8cd9 update plugin 2019-08-19 10:33:19 +08:00
joy.zhou 4c5a48a44b Plugins update log (#47)
* modify

* update

* add acl

* add feature

* update dockerfile

* add deploy

* update

* update

* plugins

* plugins

* update

* update

* update

* fixed

* remove

* fixed

* add log

* update

* fixed

* update

* fix config

* add http api

* add http api

* resp

* add config for work chan

* update

* fixed

* update

* disable trace

* fixed

* change acl

* fixed

* fixed res

* dd

* dd

* ddd

* dd

* update

* fixed

* update

* add

* fixed

* update key

* add log

* update

* format

* update

* update auth

* update

* update readme

* added

* update

* fixed

* fixed

* fix

* upade

* update

* update

* update
2019-07-25 16:01:40 +08:00
joy.zhou c6b1f1db42 Plugins support (#46)
* modify

* update

* add acl

* add feature

* update dockerfile

* add deploy

* update

* update

* plugins

* plugins

* update

* update

* update

* fixed

* remove

* fixed

* add log

* update

* fixed

* update

* fix config

* add http api

* add http api

* resp

* add config for work chan

* update

* fixed

* update

* disable trace

* fixed

* change acl

* fixed

* fixed res

* dd

* dd

* ddd

* dd

* update

* fixed

* update

* add

* fixed

* update key

* add log

* update

* format

* update

* update auth

* update

* update readme

* added

* update

* fixed

* fixed

* fix

* upade

* update

* update
2019-07-25 13:54:42 +08:00
joy.zhou c350d16ca1 add fix pool for message order (#42)
* fix pool for message order

* add go modules
2019-04-24 14:54:21 +08:00
joyz 6193be74fa Merge branch 'master' of https://github.com/fhmq/hmq 2019-01-22 22:11:59 +08:00
joyz 90beada459 some modify 2019-01-22 22:11:54 +08:00
Marc Magnin 6c7fe6a0f7 simple fix (#35) 2019-01-07 19:56:00 +08:00
joy.zhou 7547ad3bdc Restruct (#34)
* modify

* remove

* modify

* modify

* remove no use

* add online/offline notification

* modify

* format log

* add reference
2018-12-26 14:51:13 +08:00
joy.zhou 5ed4728575 Wpool (#23)
* pool

* pool

* wpool
2018-04-04 13:49:52 +08:00
zhouyuyan c0fea6a5ba modify_message_pool 2018-02-24 13:19:43 +08:00
joy.zhou 7155667f6c Pool (#16)
* add pool

* elastic workerpool

* del buf

* modify usage

* modify readme
2018-02-03 12:42:25 +08:00
Marc Magnin ef252550dc fhmq/hmq#5 added zap logger (#11) 2018-01-26 13:51:36 +08:00
zhouyuyan 93b21777ff add lisence 2018-01-25 13:47:50 +08:00
Marc Magnin ca3951769a fhmq/hmq#2 added full package ref 2018-01-23 15:29:16 +01:00
zhouyuyan 0439e7ce90 fxi ws conn 2018-01-22 09:30:08 +08:00
zhouyuyan dc0f2185ab skip self 2018-01-19 13:53:47 +08:00
zhouyuyan 114e6f901e modify cluster 2018-01-19 13:41:17 +08:00
zhouyuyan 819b4725f2 modify route 2018-01-18 09:17:48 +08:00
zhouyuyan 7db7edaa17 cluster fix 2018-01-17 09:39:07 +08:00
zhouyuyan 1d6f6a4a71 add cluster 2018-01-16 16:50:10 +08:00
zhouyuyan 123bb7210f move dispatcher 2018-01-02 10:55:28 +08:00