Thanks for your Help. After much debugging I found out that
when the client stopped getting messages the frequency of
pings have actually reduced and it was always happening after
a Reconnect (not every time after reconnect but definitely
after a reconnect).
This led me to inspect my connect call. I realised that I
was using an overloaded connect function in wrong
My Usage :
Because of this it was somehow treating my c.getConnectionOptions()
as UserContext (according to the 2 parameter
overloaded method signature)
and maybe then taking default values for connectOptions
setting the clean session flag to TRUE and what not. Because
of this it did not give any errors.
So it was a null that made all the difference.
I hope my solution is of help to someone who just needs
nothing(null) more than he already has.