losing message on short network failure

14 views
Skip to first unread message

Ram C

unread,
Aug 27, 2019, 3:20:54 PM8/27/19
to cometd-users
Hi Simone,

I noticed cometd connection broken message in the browser console log while in debug mode. (breakpoint set in chrome). Since the /meta/connect message is not received in given time the server marked the connection broken and cleanup the session.  

When the client re-established the long poll, is there a way to send the undelivered messages from server?

thanks,
Ram

Simone Bordet

unread,
Aug 28, 2019, 10:34:31 AM8/28/19
to cometd-users
Hi,

On Tue, Aug 27, 2019 at 9:20 PM Ram C <time...@gmail.com> wrote:
>
> Hi Simone,
>
> I noticed cometd connection broken message in the browser console log while in debug mode. (breakpoint set in chrome). Since the /meta/connect message is not received in given time the server marked the connection broken and cleanup the session.

That is a *long* network failure, not a short one.

> When the client re-established the long poll, is there a way to send the undelivered messages from server?

CometD by default does not store in a persistent way the messages
destined to a client, because the client may never show up again and
the messages will be stored indefinitely, etc.
However, if you need such feature, which is highly application logic
dependent (and that is the reason why CometD does not implement it -
whatever solution won't work for all cases), you can implement it
yourself by using CometD listeners: for example, whenever a message is
added to the queue for a remote client, you store it into a persistent
storage.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.

Ram C

unread,
Aug 28, 2019, 1:39:13 PM8/28/19
to cometd-users
Hi Simone,

thanks for the reply. Could you please point me the listeners doc?


On Wednesday, August 28, 2019 at 10:34:31 AM UTC-4, Simone Bordet wrote:
Hi,

Cosimo

unread,
Aug 28, 2019, 1:40:55 PM8/28/19
to cometd...@googlegroups.com
On Wed, Aug 28, 2019, at 19:39, Ram C wrote:
Hi Simone,

thanks for the reply. Could you please point me the listeners doc?

Ram C

unread,
Aug 28, 2019, 1:52:07 PM8/28/19
to cometd-users
with this Queue Listener callback I can store the messages into persistent storage but is there a callback to know the client connection is broken?

thank you.

Cosimo

unread,
Aug 28, 2019, 3:51:49 PM8/28/19
to cometd...@googlegroups.com
On Wed, Aug 28, 2019, at 19:52, Ram C wrote:
with this Queue Listener callback I can store the messages into persistent storage but is there a callback to know the client connection is broken?

There are a bunch of Listener classes you may want to explore.


-- 
Cosimo

Ram C

unread,
Aug 29, 2019, 4:06:39 AM8/29/19
to cometd-users
ok. Thank you.
Reply all
Reply to author
Forward
0 new messages