hi
please @michaelklishin would can help me.
I have problems with a mqtt client but not happen with amqp client, I use a broker rabbitmq.
my stage are three pc in a network lan
This error with mqtt client
railpc@railpc-VirtualBox:/media/sf_ProjectRubyLinux/Ruby/Semillero$ ruby producer_mqtt.rb
=> Published Message mqtt sended @ 1430402156
/home/railpc/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mqtt-0.3.1/lib/mqtt/packet.rb:283:in `read_byte': Failed to read byte from socket (MQTT::ProtocolException)
from /home/railpc/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mqtt-0.3.1/lib/mqtt/packet.rb:31:in `read'
from /home/railpc/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:454:in `receive_packet'
from /home/railpc/.rbenv/versions/2.1.1/lib/ruby/gems/2.1.0/gems/mqtt-0.3.1/lib/mqtt/client.rb:283:in `block in connect'
The code of mqtt client :
require "mqtt"
c = MQTT::Client.connect(
host: '192.168.1.5',
port: 1883,
username: 'guest',
password: 'guest')
loop do
m = "Message mqtt sended @ #{Time.now.to_i} "
c.publish("builds", m)
puts "=> Published #{m}"
sleep 0.2
end
The broker have is configuration in rabbitmq.config :
hi please @michaelklishin would can help me. I have problems with a mqtt client but not happen with amqp client, I use a broker rabbitmq. my stage are three pc in a network lan
This error with mqtt client
The code of mqtt client :
The broker have is configuration in rabbitmq.config :
sorry to my english. thanks @michaelklishin :+1: