Skip to content

1zumIQ/emqx_bridge_nsq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

emqx_bridge_nsq

EMQX的NSQ桥接插件
基于4.2.14版本的EMQXENSQ进行开发

This is a plugin for the EMQ X broker and nsq.
Develop based on EMQX(version 4.2.14) and ENSQ

Plugin Config

Config Path:

etc/plugins/emqx_bridge_nsq.config
[
  {emqx_bridge_nsq, 
    [{values, [
      {bootstrap_broker, "localhost"},
      {nsq_producer_topic, data_topic},
      {nsq_producer_topic2, device_status}
    ]}
  ]}
].

Configuration item description

bootstrap_broker : host of nsqlookupd
nsq_producer_topic : topic name(for data)
nsq_producer_topic2 : topic name(for device_status)

Start the topic name with lowercase like tOPIC

Example

When MQTT publish a message

"type":"published",
"topic":"06cf442d-2f6b-72a7-85f7-2fc8423abba6/Pub",
"from":"06cf442d-2f6b-72a7-85f7-2fc8423abba6",
"payload":"{\"temp\": 27578,\"humi\": 56759,\"tvoc\": 7,\"co2\": 459,\"voci\": 101,\"pm1\": 20,\"pm2dot5\": 30,\"pm10\": 33,\"co\": 625,\"ch2o\": 12060}"

When MQTT disconnect

"type":"disconnected",
"device_id":"06cf442d-2f6b-72a7-85f7-2fc8423abba6",
"username":"emqx",
"reason":"normal"

For more information on disconnect reason, see EMQX documentation

License

Apache License Version 2.0

Author

izum1

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published