-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
DrmagicE
committed
Jan 22, 2021
1 parent
6b9850c
commit bc88939
Showing
24 changed files
with
1,071 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
pid_file: ./gmqttd1.pid | ||
listeners: | ||
# bind address | ||
- address: ":1884" | ||
# tls setting | ||
# tls: | ||
# cert_file: "path_to_cert_file" | ||
# key_file: "path_to_key_file" | ||
|
||
# - address: ":8883" | ||
# # websocket setting | ||
# websocket: | ||
# path: "/" | ||
mqtt: | ||
session_expiry: 2h | ||
session_expiry_check_timer: 20s | ||
message_expiry: 2h | ||
max_packet_size: 268435456 | ||
server_receive_maximum: 100 | ||
max_keepalive: 60 | ||
topic_alias_maximum: 10 | ||
subscription_identifier_available: true | ||
wildcard_subscription_available: true | ||
shared_subscription_available: true | ||
maximum_qos: 2 | ||
retain_available: true | ||
max_queued_messages: 10000 | ||
max_inflight: 100 | ||
queue_qos0_messages: true | ||
delivery_mode: onlyonce # overlap or onlyonce | ||
allow_zero_length_clientid: true | ||
|
||
persistence: | ||
type: memory # memory | redis | ||
# The redis configuration only take effect when type == redis. | ||
redis: | ||
# redis server address | ||
addr: "127.0.0.1:6379" | ||
# the maximum number of idle connections in the redis connection pool. | ||
max_idle: 1000 | ||
# the maximum number of connections allocated by the redis connection pool at a given time. | ||
# If zero, there is no limit on the number of connections in the pool. | ||
max_active: 0 | ||
# the connection idle timeout, connection will be closed after remaining idle for this duration. If the value is zero, then idle connections are not closed. | ||
idle_timeout: 240s | ||
password: "" | ||
# the number of the redis database. | ||
database: 0 | ||
|
||
# The topic alias manager setting. The topic alias feature is introduced by MQTT V5. | ||
# This setting is used to control how the broker manage topic alias. | ||
topic_alias_manager: | ||
# Currently, only FIFO strategy is supported. | ||
type: fifo | ||
|
||
plugins: | ||
prometheus: | ||
path: "/metrics" | ||
listen_address: ":8082" | ||
admin: | ||
http: | ||
enable: true | ||
addr: :8083 | ||
grpc: | ||
addr: 8084 | ||
auth: | ||
# Password hash type. (plain | md5 | sha256 | bcrypt) | ||
# Default to MD5. | ||
hash: md5 | ||
# The file to store password. Default to $HOME/gmqtt_password.yml | ||
# password_file: | ||
federation: | ||
node_name: node1 | ||
fed_addr: 127.0.0.1:8080 | ||
gossip_addr: 127.0.0.1:7070 | ||
join: | ||
- 127.0.0.1:7071 | ||
|
||
# plugin loading orders | ||
plugin_order: | ||
# Uncomment auth to enable authentication. | ||
#- auth | ||
#- prometheus | ||
#- admin | ||
- federation | ||
log: | ||
level: warn # debug | info | warn | error | ||
format: text # json | text | ||
# whether to dump MQTT packet in debug level | ||
dump_packet: false | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
27046 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
mockgen -source=config/config.go -destination=./config/config_mock.go -package=config -self_package=github.com/DrmagicE/gmqtt/config | ||
mockgen -source=persistence/queue/elem.go -destination=./persistence/queue/elem_mock.go -package=queue -self_package=github.com/DrmagicE/gmqtt/queue | ||
mockgen -source=persistence/queue/queue.go -destination=./persistence/queue/queue_mock.go -package=queue -self_package=github.com/DrmagicE/gmqtt/queue | ||
mockgen -source=persistence/session/session.go -destination=./persistence/session/session_mock.go -package=session -self_package=github.com/DrmagicE/gmqtt/session | ||
mockgen -source=persistence/subscription/interface.go -destination=./persistence/subscription/interface_mock.go -package=subscription -self_package=github.com/DrmagicE/gmqtt/subscription | ||
mockgen -source=persistence/unack/unack.go -destination=./persistence/unack/unack_mock.go -package=unack -self_package=github.com/DrmagicE/gmqtt/unack | ||
mockgen -source=pkg/packets/packets.go -destination=./pkg/packets/packets_mock.go -package=packets -self_package=github.com/DrmagicE/gmqtt/packets | ||
mockgen -source=plugin/auth/account_grpc.pb.go -destination=./plugin/auth/account_grpc.pb_mock.go -package=auth -self_package=github.com/DrmagicE/gmqtt/auth | ||
mockgen -source=plugin/federation/federation.pb.go -destination=./plugin/federation/federation.pb_mock.go -package=federation -self_package=github.com/DrmagicE/gmqtt/federation | ||
mockgen -source=plugin/federation/peer.go -destination=./plugin/federation/peer_mock.go -package=federation -self_package=github.com/DrmagicE/gmqtt/federation | ||
mockgen -source=retained/interface.go -destination=./retained/interface_mock.go -package=retained -self_package=github.com/DrmagicE/gmqtt/retained | ||
mockgen -source=server/client.go -destination=./server/client_mock.go -package=server -self_package=github.com/DrmagicE/gmqtt/server | ||
mockgen -source=server/persistence.go -destination=./server/persistence_mock.go -package=server -self_package=github.com/DrmagicE/gmqtt/server | ||
mockgen -source=server/plugin.go -destination=./server/plugin_mock.go -package=server -self_package=github.com/DrmagicE/gmqtt/server | ||
mockgen -source=server/server.go -destination=./server/server_mock.go -package=server -self_package=github.com/DrmagicE/gmqtt/server | ||
mockgen -source=server/service.go -destination=./server/service_mock.go -package=server -self_package=github.com/DrmagicE/gmqtt/server | ||
mockgen -source=server/stats.go -destination=./server/stats_mock.go -package=server -self_package=github.com/DrmagicE/gmqtt/server | ||
mockgen -source=server/topic_alias.go -destination=./server/topic_alias_mock.go -package=server -self_package=github.com/DrmagicE/gmqtt/server | ||
|
||
# reflection mode. | ||
# gRPC streaming mock issue: https://github.com/golang/mock/pull/163 | ||
mockgen -package=federation -destination=/usr/local/gopath/src/github.com/DrmagicE/gmqtt/plugin/federation/federation_grpc.pb_mock.go github.com/DrmagicE/gmqtt/plugin/federation FederationClient,Federation_EventStreamClient |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.