[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [iot-wg] Questions regarding MQTT/Paho
|
Hello.
FYI, configurable offline buffering over Paho is available in the Eclipse Kura project if you want to look into it.
You can look at the DataService implementation.
Thanks.
-Marco
On Jul 30, 2014, at 8:11 AM, Jens Reimann <jens.reimann@xxxxxxxxxxxxxxx> wrote:
> Hello Ian,
>
> oh I even was not aware of the fact that events are not sent when the
> connections is broken. I thought thats what the persistence stuff was for.
>
> The bug description looks good for me. Thanks for adding it!
>
> Jens
>
> On 07/30/2014 11:55 AM, Ian Craggs wrote:
>> Hi Jens,
>>
>> thanks for the comments. We are open to suggestions and contributions
>> to improve the clients of course. A frequently asked for capability
>> is to send messages when the client is disconnected ("offline
>> buffering") - it seems to me that these two improvements are related.N
>>
>> It seems to me what you are asking for is a simple reconnect using the
>> same connect options until the application calls disconnect. There
>> would be some parameters (reconnect interval/backoff). I've raised a
>> bug (https://bugs.eclipse.org/bugs/show_bug.cgi?id=440734) to track
>> the suggestion. Please feel free to add more information there.
>>
>> Ian
>>
>>
>> On 07/30/2014 08:38 AM, Jens Reimann wrote:
>>> Hello Ian,
>>>
>>> thanks for the answer.
>>>
>>> I totally understand the reason for passing through the protocol
>>> specific to a simple API. And it is important to have this control.
>>>
>>> However, now I fully understand when you bang your head on the table
>>> ;-), "I just want to push some data to MQTT".
>>>
>>> No I would guess that there are some "common ways to do it" and which
>>> get repeatedly implemented by users. So instead of everybody
>>> re-implementing these common cases, it would simply be nice to have
>>> these coming from the MQTT library.
>>>
>>> Actually In Eclipse SCADA we have the some issue. Connections simply
>>> inform you about the state, but the "AutoReconnectController" keeps the
>>> session open as long as requested.
>>>
>>> Anyway, thanks for the help. So I now know that I have to do it
>>> myself ;)
>>>
>>> Jens
>>>
>>> On 07/29/2014 03:15 PM, Ian Craggs wrote:
>>>> Hi Jens,
>>>>
>>>> what Benjamin says is correct. It is a manual step to reconnect in
>>>> the callback. This is for a number of reasons.
>>>>
>>>> 1. MQTT is defined as a protocol rather than an API, so the APIs have
>>>> been written to be close to the behaviour of MQTT. This makes it easy
>>>> to understand the APIs in the context of MQTT, and provides maximum
>>>> flexibility.
>>>>
>>>> 2. Depending on the connect options used, will message or clean
>>>> session for instance, disconnection and reconnection can have effects
>>>> which you need to know about and/or control. You may want to change
>>>> connect options when you reconnect, or delay reconnection. To allow
>>>> all these combinations on automatic reconnection would require a
>>>> complicated API.
>>>>
>>>> Ian
>>>>
>>>> On 07/25/2014 02:08 PM, Benjamin Cabé wrote:
>>>>> Hi Jens,
>>>>>
>>>>> I think you may want to post this question on the paho-dev mailing
>>>>> list (I
>>>>> cross-posted there)!
>>>>> My understanding though is that when the MqttCallback#connectionLost()
>>>>> method is called, it's up to you to decide whether you want to
>>>>> reconnect
>>>>> or not.
>>>>>
>>>>> Benjamin.
>>>>>
>>>>>
>>>>> Le 25/07/2014 14:47, « Jens Reimann » <jens.reimann@xxxxxxxxxxxxxxx> a
>>>>> écrit :
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> maybe somebody can give me a short hint about the MqttAsyncClient
>>>>>> from
>>>>>> Paho.
>>>>>>
>>>>>> I found the javadoc, and know how to connect and disconnect. What I
>>>>>> don't know is, what will happen when the connection breaks. Does it
>>>>>> automatically re-connect, or is this a "manual" step?
>>>>>>
>>>>>> Thanks for helping
>>>>>>
>>>>>> Jens
>>>>>>
>>>>>> --
>>>>>> IBH SYSTEMS GmbH
>>>>>> D-85235 Pfaffenhofen an der Glonn
>>>>>> Läutenring 43
>>>>>> Geschäftsführer / CEO: Dr. Thomas Heitzig
>>>>>>
>>>>>> Amtsgericht München
>>>>>> Handelsregister Nummer HRB 197959
>>>>>> USt ID: DE267945175
>>>>>>
>>>>>> Office Munich
>>>>>> D 80992 München
>>>>>> Agnes-Pockels-Bogen 1
>>>>>> T +49 89 18 9 17 49 0
>>>>>>
>>>>>> The information transmitted is intended only for the person or entity
>>>>>> to which it is addressed and may contain confidential and/or
>>>>>> pivileged
>>>>>> material. Any review, retransmission, dissemination or other use of,
>>>>>> or taking of any action in reliance upon, this information by persons
>>>>>> or entities other than the intended recipient is prohibited. If you
>>>>>> received this in error, please contact the sender and delete the
>>>>>> material from any computer.
>>>>>>
>>>>>> _______________________________________________
>>>>>> iot-wg mailing list
>>>>>> iot-wg@xxxxxxxxxxx
>>>>>> To change your delivery options, retrieve your password, or
>>>>>> unsubscribe
>>>>>> from this list, visit
>>>>>> https://dev.eclipse.org/mailman/listinfo/iot-wg
>>>>>>
>>>>> _______________________________________________
>>>>> iot-wg mailing list
>>>>> iot-wg@xxxxxxxxxxx
>>>>> To change your delivery options, retrieve your password, or
>>>>> unsubscribe from this list, visit
>>>>> https://dev.eclipse.org/mailman/listinfo/iot-wg
>>> _______________________________________________
>>> iot-wg mailing list
>>> iot-wg@xxxxxxxxxxx
>>> To change your delivery options, retrieve your password, or
>>> unsubscribe from this list, visit
>>> https://dev.eclipse.org/mailman/listinfo/iot-wg
>>
>
>
> _______________________________________________
> iot-wg mailing list
> iot-wg@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://dev.eclipse.org/mailman/listinfo/iot-wg