简体   繁体   中英

How to configure Mqtt in Ruby On Rails application

I am using MQTT for an application in which I am working with sensors and time series database. I have written some code which is working properly.I put the connection establishment inside scheduler. When server initializes it will automatically call a method where I wrote some code to connect to MQTT. But, Right now I am thinking it was not good. Please help on this. Instead of writing in scheduler how can I configure MQTT connection in a rails application.

Have you check this link? http://blog.mallow-tech.com/2016/11/iot-in-rails-with-aws-mqtt/ Here it shows how to use mqtt with rails using a ruby gem https://rubygems.org/gems/mqtt

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM