chore: update gateway configurations examples

This commit is contained in:
JianBo He 2023-06-20 17:06:37 +08:00
parent 3f0d9db674
commit 97fc7040c8
5 changed files with 122 additions and 54 deletions

View File

@ -7,13 +7,18 @@
## you should copy and paste the below data into the emqx.conf for working
gateway.coap {
enable = true
## When publishing or subscribing, prefix all topics with a mountpoint string.
## It's a way that you can use to implement isolation of message routing between different
## gateway protocols
mountpoint = "coap/"
## Enable or disable connection mode.
## Connection mode is a feature of non-standard protocols. When connection mode is enabled,
## it is necessary to maintain the creation, authentication and alive of connection resources
connection_required = false
enable_stats = true
heartbeat = 30s
idle_timeout = 30s
mountpoint = "coap2/"
notify_type = qos
publish_qos = coap
subscribe_qos = coap
listeners.udp.default {
bind = "0.0.0.0:5683"
}
}

View File

@ -7,13 +7,25 @@
## you should copy and paste the below data into the emqx.conf for working
gateway.exproto {
enable = true
enable_stats = true
frame {
max_body_length = 655350
max_headers = 100
max_headers_length = 10240
## When publishing or subscribing, prefix all topics with a mountpoint string.
## It's a way that you can use to implement isolation of message routing between different
## gateway protocols
mountpoint = "exproto/"
## Configurations for starting the ConnectionAdapter service
server {
bind = "0.0.0.0:9100"
ssl_options {verify = "verify_none"}
}
## Configurations for request to ConnectionHandler service
handler {
address = "http://127.0.0.1:9001"
ssl_options {enable = false}
}
listeners.tcp.default {
bind = "0.0.0.0:7993"
}
idle_timeout = 30s
mountpoint = "stomp2/"
}

View File

@ -7,31 +7,56 @@
## you should copy and paste the below data into the emqx.conf for working
gateway.lwm2m {
## When publishing or subscribing, prefix all topics with a mountpoint string.
## It's a way that you can use to implement isolation of message routing between different
## gateway protocols
mountpoint = "lwm2m/"
## The Directory for LwM2M Resource definition.
xml_dir = "etc/lwm2m_xml/"
## Automatically observe the object list of REGISTER packet.
auto_observe = false
enable = true
enable_stats = true
idle_timeout = 30s
lifetime_max = 86400s
## Minimum value of lifetime allowed to be set by the LwM2M client.
lifetime_min = 1s
mountpoint = "lwm2m2/"
## Maximum value of lifetime allowed to be set by the LwM2M client.
lifetime_max = 86400s
## The value of the time window during which the network link is considered valid by
## the LwM2M Gateway in QMode mode.
qmode_time_window = 22s
## Topic configuration for LwM2M's gateway publishing and subscription.
translators {
command {
topic = "dn/#"
}
notify {
topic = "up/notify"
}
register {
topic = "up/resp"
},
response {
topic = "up/resp"
},
update {
topic = "up/resp"
}
## The topic for receiving downstream commands.
## For each new LwM2M client that succeeds in going online, the gateway creates a
## subscription relationship to receive downstream commands and send it to the LwM2M client
command { topic = "dn/#" }
## The topic for gateway to publish the notify events from LwM2M client.
## After succeed observe a resource of LwM2M client, Gateway will send the notify events
## via this topic, if the client reports any resource changes
notify { topic = "up/notify" }
## The topic for gateway to publish the register events from LwM2M client.
register { topic = "up/register" },
## The topic for gateway to publish the acknowledge events from LwM2M client.
response { topic = "up/resp" },
## The topic for gateway to publish the update events from LwM2M client.
update { topic = "up/resp" }
}
## Policy for publishing UPDATE event message.<br/>
## - always: send update events as long as the UPDATE request is received.<br/>
## - contains_object_list: send update events only if the UPDATE request carries any Object List"""
update_msg_publish_condition = always
xml_dir = "/etc/emqx/lwm2m_xml"
listeners.udp.default {
bind = "0.0.0.0:5784"
}
}

View File

@ -7,17 +7,32 @@
## you should copy and paste the below data into the emqx.conf for working
gateway.mqttsn {
## When publishing or subscribing, prefix all topics with a mountpoint string.
## It's a way that you can use to implement isolation of message routing between different
## gateway protocols
mountpoint = "mqttsn/"
## Whether to periodically broadcast ADVERTISE messages
broadcast = true
enable = true
enable_qos3 = false
enable_stats = true
## The Gateway ID.
## When the broadcast option is enabled, the gateway will broadcast ADVERTISE message with this value
gateway_id = 1
idle_timeout = 30s
mountpoint = "mqttsn2/"
## Allows connectionless clients to publish messages with a Qos of -1.
## This feature is defined for very simple client implementations which do not support any other
## features except this one. There is no connection setup nor tear down, no registration nor
## subscription. The client just sends its 'PUBLISH' messages to a GW
enable_qos3 = false
## The pre-defined topic IDs and topic names
predefined = [
{
id = 1003
topic = "pred/1003"
}
{id = 1, topic = "predefined/topic1"},
{id = 2, topic = "predefined/topic2"}
]
listeners.udp.default {
bind = "0.0.0.0:1884"
}
}

View File

@ -7,13 +7,24 @@
## you should copy and paste the below data into the emqx.conf for working
gateway.stomp {
enable: true
enable_stats: true
frame: {
max_body_length: 655350
max_headers: 100
max_headers_length: 10240
## When publishing or subscribing, prefix all topics with a mountpoint string.
## It's a way that you can use to implement isolation of message routing between different
## gateway protocols
mountpoint = "stomp/"
frame {
## The maximum number of Header
max_headers = 10
## The maximum string length of the Header name and value.
max_headers_length = 1024
## The Maximum number of bytes of Body allowed per Stomp packet.
max_body_length = 65536
}
listeners.tcp.default {
bind = 0.0.0.0:61613
}
idle_timeout: 30s
mountpoint: "stomp2/"
}