You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Danielius Jurna <da...@elitnet.lt> on 2006/05/02 20:03:17 UTC

Stomp keep-alives

Hi.

How to implement reliable connections using stomp? Actually we need some
sort of ping or keep-alive message. I've looked at stomp protocol and
couldn't find such one. Maybe there is some symbol, which is ignored by
stomp transport?
--
View this message in context: http://www.nabble.com/Stomp-keep-alives-t1544787.html#a4196346
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Stomp keep-alives

Posted by Danielius Jurna <da...@elitnet.lt>.
Great. 
TCP timeout is something about few hours even on the same network, so
usually you cannot rely on it. If you unplug the cable from the Broker
machine, you'll see that it takes a lot of time to detect that on client
machine. If cable is unpluged from client machine, it is detected
immediatly, because OS detects that and destroys all active sockets.
--
View this message in context: http://www.nabble.com/Stomp-keep-alives-t1544787.html#a4224449
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Stomp keep-alives

Posted by James Strachan <ja...@gmail.com>.
On 5/3/06, Danielius Jurna <da...@elitnet.lt> wrote:
>
>
> Sending message to a topic will add additional load to the broker, anyway
> this kind of solution is only a quick work-around.


Though to be honest sending an empty message every 5 seconds or so (when the
client is not doing much) to a non-durable topic with no consumers has very
little overhead.

Having additional keep-alive command in stomp client would be appreciated.
> Even more, I think stomp protocol cannot be used in production for
> consuming
> messages without this feature.


Well; the ActiveMQ server can disable the inactivity timeout and so just
rely on TCP timeouts instead. But given the unreliability of TCP timeouts in
complex networks, the keep alive is a great option. I chatted on IRC with
Brian and I think we managed to convince him to add it to the STOMP protocol
as a verb.

--

James
-------
http://radio.weblogs.com/0112098/

Re: Stomp keep-alives

Posted by Danielius Jurna <da...@elitnet.lt>.
Sending message to a topic will add additional load to the broker, anyway
this kind of solution is only a quick work-around.
Having additional keep-alive command in stomp client would be appreciated.
Even more, I think stomp protocol cannot be used in production for consuming
messages without this feature.
--
View this message in context: http://www.nabble.com/Stomp-keep-alives-t1544787.html#a4216056
Sent from the ActiveMQ - User forum at Nabble.com.


Re: Stomp keep-alives

Posted by James Strachan <ja...@gmail.com>.
Yeah - we could add a keep alive verb.

Another approach is just to send a message to a dummy keep alive topic
that noone ever subscribes to (so a broker will just discard the
message).

e.g. send to

/topic/stomp/keepAlive

an empty message?

On 5/2/06, Danielius Jurna <da...@elitnet.lt> wrote:
>
> Hi.
>
> How to implement reliable connections using stomp? Actually we need some
> sort of ping or keep-alive message. I've looked at stomp protocol and
> couldn't find such one. Maybe there is some symbol, which is ignored by
> stomp transport?
> --
> View this message in context: http://www.nabble.com/Stomp-keep-alives-t1544787.html#a4196346
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


--

James
-------
http://radio.weblogs.com/0112098/