-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Description
Hey folks,
I'm trying to establish a non clean session on my "subscriber", but it doesn't seem to work. I've verified that QoS1 is on the publisher by using mosquito_sub tools. This is how I spin up my consumer:
#!ruby
require 'rubygems'
require 'mqtt'
# Subscribe example
c = MQTT::Client.connect(
:host => 'localhost',
:port => 1883,
:ssl => false,
:username => 'user',
:password => 'password',
:clean_session => false,
:client_id => "consumer",
)
puts c.clean_session
puts c.client_id
c.get('test') do |topic,message|
puts "Recv: #{topic}: #{message}"
end
If I use the above script to connect, then disconnect, the messages generated in the interim are lost.
If I use
mosquitto_sub -i subscriber -t test -h localhost -v -d -c -q 1
then I get queued up messages delivered.
I also tried this with paho.mqqt.ruby, and that works fine as well.
Metadata
Metadata
Assignees
Labels
No labels