Hello, everyone.

This is my first post in internet. First I mean really first for all the
time :)
So let's try to explain. We use broker activeMQ version 5.15.4 and MQTT
3.1.1 client (mobile application).
I adjusted broker and wrote MQTT client. I have only one problem now with
durable subscriptions.
MQTT client make successfull connect to Topic (let it be ABC) with specified
parameters and subscribe. So durable subscription created. I see this
durable subscription in ActiveMQ brkoer in Active durable subscriptions.
When I manually disconnect active durable subscription moves to offline
durable subscriptiion.
After that I send messages to this Topic ABC and they keeps enqueued. When I
connect I use subscribe method and Offline durable subscription becomes
Active durable subscription and I get all these messages from Topic ABC.
But if I connect to Topic ABC and not disconnect manually and connection
lost (mobile internet turned off or wi-fi turned off, no matter) this
subscription stays Active durable subscription (but in fact client is
offline).  And if there were sent messages to this Topic ABC while client
was offline due to connection problem, all messages are dequeued
automatically but nowhere. So logically, when client becomes offline he can
not inform broker that he is offline, but is it real or maybe there
something on broker side, that could tell broker not to dequeue message. I
mean maybe broker can send some kind of ping request to client before
dequeueing this message and if no ping response move this active durable
subscription to offline durable subscription.

For now due to this problem we have to connect, send all messages, that were
manually stored before and recieve all messages in subscription topic and
then disconnect to make it offline, so in that case messages won't be lost
(of course if for this period connect-disconnect there was not unexpectable
disconnect).

Sorry for my English and if there were same posts already. Could you please
help me if it can be solved.



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html

Reply via email to