[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] Client be disconnected when keepAliveInterval more than 10 secs
|
Hi René,
I think it's same with me.
The issue has been raised: https://bugs.eclipse.org/bugs/show_bug.cgi?id=392825
best regards,
Charles.
On Oct 25, 2012, at 8:59 PM, rvjansen <rvjansen@xxxxxxxxx> wrote:
> Charles,
>
> thank you. On my system, the client throws an MqttException with the message "Connection lost (32109) - java.io.EOFException."
> If it is the same, I do not need to enter a duplicate.
>
> best regards,
>
> René.
>
> On 2012-10-25 14:44, Charles Wang | 王晨 wrote:
>> I'll post the issue to Bugzilla.
>>
>> best regards,
>>
>> Charles.
>>
>> On Oct 25, 2012, at 8:39 PM, "andypiperuk@xxxxxxxxx [19]"
>> <andypiperuk@xxxxxxxxx [20]> wrote:
>>
>>> As Dave says, getting an issue in the Bugzilla tracker will ensure
>>> that we can look at it properly. Please add as much of the detail as
>>> you can (including the timings etc you mentioned).
>>>
>>> Regarding IA92, it's deprecated; doesn't support authentication; and
>>> the license is not the same as Paho, so you may need to be careful
>>> about using it in a commercial manner.
>>>
>>> Andy
>>>
>>> On Thu, Oct 25, 2012 at 2:35 PM, René Jansen <rvjansen@xxxxxxxxx
>>> [15]> wrote:
>>>
>>>> Thanks Dave, that was quick. I timed the timeout at a constant 2
>>>> minutes 38 seconds before adding the reconnect.
>>>> I'll have a look at the exception and will file an issue.
>>>>
>>>> best regards,
>>>>
>>>> René.
>>>>
>>>> On 25 okt. 2012, at 14:29, Dave Locke <locke@xxxxxxxxxx [12]>
>>>> wrote:
>>>>
>>>>> The Paho Java Client should keep the connection alive by sending
>>>>> pings every keepalive interval if no other messages flow. If the
>>>>> network is in good shape and the sever is running correctly it
>>>>> should stay connected forever. Is Mosquitto putting out an error
>>>>> stating it has killed the client as it has not received any
>>>>> packets from the client? If that is the case it could be a bug
>>>>> in the Java client. It is always 5 mins that the client is
>>>>> disconnected?
>>>>>
>>>>> Can you raise a bug on bugzilla against paho here with full
>>>>> details? Paho bugzilla site can be found here:
>>>>>
>>>>
>>>
>> https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&product=Paho&list_id=3330457
>>>>> [1]
>>>>>
>>>>> Per Rene it is a good idea to code the connectionLost call back
>>>>> to handle the case when a client disconnects abnormally e.g.
>>>>> blip in the network....
>>>>>
>>>>> Dave
>>>>>
>>>>> From: René Jansen <rvjansen@xxxxxxxxx [2]>
>>>>> To: General development discussions for paho project
>>>>> <paho-dev@xxxxxxxxxxx [3]>,
>>>>> Date: 25/10/2012 13:06
>>>>> Subject: Re: [paho-dev] Client be disconnected when
>>>>> keepAliveInterval more than 10 secs
>>>>> Sent by: paho-dev-bounces@xxxxxxxxxxx [4]
>>>>>
>>>>> -------------------------
>>>>>
>>>>> Hi Charles,
>>>>>
>>>>> I just reconnect when the connectionLost event comes in:
>>>>>
>>>>> method connectionLost(t=Throwable)
>>>>> do
>>>>> connectAndSubscribe()
>>>>> catch mqx=MqttException
>>>>> log(mqx.getMessage())
>>>>> end
>>>>>
>>>>> (this is NetRexx source but you get the picture).
>>>>>
>>>>> best regards,
>>>>>
>>>>> René Jansen.
>>>>>
>>>>> On 25 okt. 2012, at 13:01, Charles Wang | 王晨
>>>>> <kitta4587@xxxxxxxxx [5]> wrote:
>>>>>
>>>>> > I tried Mosquitto and ActiveMQ, the code is simple:
>>>>> >
>>>>> > MqttClient client = new MqttClient("tcp://10.18.93.54:1883",
>>>>> "charles_subscribe");
>>>>> > MqttConnectOptions opts = new MqttConnectOptions();
>>>>> > opts.setKeepAliveInterval(10);
>>>>> > opts.setCleanSession(true);
>>>>> >
>>>>> > client.setCallback(this);
>>>>> > client.connect(opts);
>>>>> > client.subscribe(topic);
>>>>> >
>>>>> > try {
>>>>> > System.in.read();
>>>>> > } catch (IOException e) {
>>>>> > //If we can't read we'll just exit
>>>>> > }
>>>>> >
>>>>> > // Disconnect the client
>>>>> > client.disconnect();
>>>>> >
>>>>> > When keepAliveInterval more than 10 secs, the server will
>>>>> kill the connection after about 5 mins.
>>>>> > But the Mosquitto library for C is worked.
>>>>> > _______________________________________________
>>>>> > paho-dev mailing list
>>>>> > paho-dev@xxxxxxxxxxx [6]
>>>>> > http://dev.eclipse.org/mailman/listinfo/paho-dev [7]
>>>>>
>>>>> _______________________________________________
>>>>> paho-dev mailing list
>>>>> paho-dev@xxxxxxxxxxx [8]
>>>>> http://dev.eclipse.org/mailman/listinfo/paho-dev [9]
>>>>>
>>>>> Unless stated otherwise above:
>>>>> IBM United Kingdom Limited - Registered in England and Wales
>>>>> with number 741598.
>>>>> Registered office: PO Box 41, North Harbour, Portsmouth,
>>>>> Hampshire PO6 3AU
>>>>> _______________________________________________
>>>>> paho-dev mailing list
>>>>> paho-dev@xxxxxxxxxxx [10]
>>>>> http://dev.eclipse.org/mailman/listinfo/paho-dev [11]
>>>>
>>>> _______________________________________________
>>>> paho-dev mailing list
>>>> paho-dev@xxxxxxxxxxx [13]
>>>> http://dev.eclipse.org/mailman/listinfo/paho-dev [14]
>>>
>>> --
>>> Andy Piper | Farnborough, Hampshire (UK)
>>> blog: http://andypiper.co.uk [16] | skype: andypiperuk
>>> twitter: @andypiper | images: http://www.flickr.com/photos/andypiper
>>> [17]
>>> _______________________________________________
>>> paho-dev mailing list
>>> paho-dev@xxxxxxxxxxx [18]
>>> http://dev.eclipse.org/mailman/listinfo/paho-dev
>>
>>
>>
>> Links:
>> ------
>> [1]
>> https://bugs.eclipse.org/bugs/buglist.cgi?query_format=advanced&product=Paho&list_id=3330457
>> [2] mailto:rvjansen@xxxxxxxxx
>> [3] mailto:paho-dev@xxxxxxxxxxx
>> [4] mailto:paho-dev-bounces@xxxxxxxxxxx
>> [5] mailto:kitta4587@xxxxxxxxx
>> [6] mailto:paho-dev@xxxxxxxxxxx
>> [7] http://dev.eclipse.org/mailman/listinfo/paho-dev
>> [8] mailto:paho-dev@xxxxxxxxxxx
>> [9] http://dev.eclipse.org/mailman/listinfo/paho-dev
>> [10] mailto:paho-dev@xxxxxxxxxxx
>> [11] http://dev.eclipse.org/mailman/listinfo/paho-dev
>> [12] mailto:locke@xxxxxxxxxx
>> [13] mailto:paho-dev@xxxxxxxxxxx
>> [14] http://dev.eclipse.org/mailman/listinfo/paho-dev
>> [15] mailto:rvjansen@xxxxxxxxx
>> [16] http://andypiper.co.uk/
>> [17] http://www.flickr.com/photos/andypiper
>> [18] mailto:paho-dev@xxxxxxxxxxx
>> [19] mailto:andypiperuk@xxxxxxxxx
>> [20] mailto:andypiperuk@xxxxxxxxx
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/paho-dev