maydemirx / moquette-mqtt

Automatically exported from code.google.com/p/moquette-mqtt
Apache License 2.0
0 stars 1 forks source link

It does not work while subscribe one topic the second time after reconnected #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
org.dna.mqtt.moquette.messaging.spi.impl.subscriptions.TreeNode line 151 should 
be:

child.activate(clientID);

not:

child.deactivate(clientID);

Original issue reported on code.google.com by shimon.xin@gmail.com on 15 Nov 2013 at 7:42

GoogleCodeExporter commented 8 years ago
Hi Shimon,
please could you describe better the use case?

As I understood you have 
1) a client named A that connects to the broker, 
2) subscribe to one topic, for example /forecasts
3) disconnects
4) the same client reconnects to the broker 

What's the expected behaviour? That you receive the published messages to the 
topic where the client was previously subscribed?

Original comment by selva.an...@gmail.com on 18 Nov 2013 at 10:36

GoogleCodeExporter commented 8 years ago
Hi Selva,
My client configuration are: cleanSession=false,QoS=1, and the expected output 
is :
Topic: /topic, payload: Hello world MQTT!!5
Topic: /topic, payload: Hello world MQTT!!6
Topic: /topic, payload: Hello world MQTT!!7
Topic: /topic, payload: Hello world MQTT!!8
Topic: /topic, payload: Hello world MQTT!!9
Topic: /topic, payload: Hello world MQTT!!10
Topic: /topic, payload: Hello world MQTT!!11
Topic: /topic, payload: Hello world MQTT!!12
Topic: /topic, payload: Hello world MQTT!!13

but the output now is 
Topic: /topic, payload: Hello world MQTT!!5
Topic: /topic, payload: Hello world MQTT!!6
Topic: /topic, payload: Hello world MQTT!!7

and never recieve any messages !

Original comment by shimon.xin@gmail.com on 25 Nov 2013 at 7:01

Attachments:

GoogleCodeExporter commented 8 years ago
after I changed "child.activate(clientID)" the output is :
Topic: /topic, payload: Hello world MQTT!!5
Topic: /topic, payload: Hello world MQTT!!6
Topic: /topic, payload: Hello world MQTT!!7
Topic: /topic, payload: Hello world MQTT!!11
Topic: /topic, payload: Hello world MQTT!!12
Topic: /topic, payload: Hello world MQTT!!13

So there may be a bug in QoS1 processing

Original comment by shimon.xin@gmail.com on 25 Nov 2013 at 7:08

GoogleCodeExporter commented 8 years ago
This issue was closed by revision f649ebff2488.

Original comment by selva.an...@gmail.com on 25 Nov 2013 at 5:56