Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] PINGREQ from Eclipse Paho client ?

Hi,
I have modified the Java client to remove the 10 sec restriction on both KeepAlive and Connect timeout. Will sync across to the master repository in the next few days

All the best
Dave


 



From:        "Nicholas O'Leary" <nick.oleary@xxxxxxxxx>
To:        General development discussions for paho project <paho-dev@xxxxxxxxxxx>,
Date:        07/06/2012 18:47
Subject:        Re: [paho-dev] PINGREQ from Eclipse Paho client ?
Sent by:        paho-dev-bounces@xxxxxxxxxxx




Hi Nagesh

> do I specifically send out a PINGREQ

The client handles the PINGREQ internally - there is nothing you have
to do to trigger a PINGREQ to be sent.

> At run time, I get a IllegalArgumentException ! What is wrong ?

The javadoc for MqttConnectOptions.setKeepAliveInterval clearly says this:
 @throws IllegalArgumentException if the interval is less than 10 seconds.
.. which it is in your code.

That said, from a comment Arlen made (I've lost track where exactly..
perhaps over on the mqtt google group), I think we need to remove this
artificial restriction in keepAlive value in the client. I'll try to
figure out where/how to raise an issue on the paho bugzilla for this.

Cheers,
Nick

On 7 June 2012 18:26, ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S)
<nageshblore@xxxxxxxxx> wrote:
> Hi,
> I am experimenting with a client written in Paho.
>
> Suppose, after connecting to the broker, I do a for loop for a billion times
> doing nothing. Let us say, the time taken for this loop is t1 and keepAlive
> has been set to t2. If t1 < t2, then do I specifically send out a PINGREQ
> after t2 seconds are over ? If t1 > t2, then the client would have sent out
> PINGREQ automatically ?
>
> I am also facing this other peculiar issue. I wanted to change the keepAlive
> value and so, I used the following. At run time, I get a
> IllegalArgumentException ! What is wrong ?
>
> MqttClient mc = new MqttClient(ipAddress, clientID) ;
> MqttConnectOptions connOptions = new MqttConnectOptions();
> connOptions.setKeepAliveInterval(5);
> mc.connect(connOptions);
>
> Nagesh
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
>
http://dev.eclipse.org/mailman/listinfo/paho-dev
>
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/paho-dev


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

Back to the top