Tuesday, 03 March 2020
  6 Replies
  1K Visits
I tried to change the RFC6455 = false in MQTT component to test the raw socket connection on port 1883 with RabbitMQ.
When I do this with persistent session this happens:
1. Connect client 1
2. Connect client 2
3. Client 1 is the publisher
4. Client 2 is the subscriber
5. CLient 1 publish "Hello"
6. Client 2 receive "Hello"
7. Client 2 disconnect (without unsubscribing)
8. CLient 1 publish "Hello1", then "Hello2", then "Hello3"
9. Client 2 reconnect (with persistent session, I repeat it)
10. Client 2 receive "Hello1" and "Hello2" NOT "Hello3"
11. Client 2 disconnect again
12. Client 2 reconnect
13. Client 2 receive "Hello3"

This is absolutely strange, as with WebSocket when client 2 reconnect it receives all the "Hello1\2\3" one after the other.

If between the points 10 and 11, the client 1 publish something else then the queue is corrupted, as I receive "Hello3" after other stuff which must arrive first.

Any idea about this behavior?

With WebSocket everything does the right job.

Thanks in advance.

ps: I use la very last version of sgc (4.3.4)