We're having difficulties with persistent clients (using
cleanSession=false). We would like to get messages that were sent while
our client was disconnected.
Steps to reproduce:
1. start route to create the initial subscription for the testclient
from("mqtt:bar?subscribeTopicName=testtopic&cleanSession=false&clientId=testclient&host=tcp://localhost:1883&qualityOfService=ExactlyOnce").transform(body().convertToString()).to("mock:test");
2. stop route (disconnect from broker)
3. send message to testtopic with qos 2 using another client id (e.g.
from cli)
4. repeat step 1. to connect and re-subscribe to testtopic
expected behaviour:
message delivered to mock endpoint (mock:test)
actual behaviour:
publish (delivery) to testclient is shown in broker log (mosquitto) and
in trace of
fusesource MQTTEndpoint but message is not delivered to mock endpoint.
The subscription and hence the callback is not setup at the connect time.
More or less same behaviour when paho client is used instead.