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 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
>


Back to the top