activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <>
Subject Re: disable Max Inactivity Duration
Date Tue, 20 Feb 2007 10:32:17 GMT
On 2/19/07, Suchitha Koneru (sukoneru) <> wrote:
> Hello Active Mq users,
>    Thank you James, for your help in regard to Inactivity Exceptions.
>                   For  disabling the Max Inactivity Duration , so that
> the broker is always active
> should I configure the broker as  follows
> BrokerService broker = new BrokerService();
> broker.addConnector("tcp://localhost:61616?trace=true&wireFormat.maxInac
> tivityDuration= -1");
> broker.start();
> maxInactivityDuration is a long value , if I set it to -1 , will the
> broker stay alive for ever ?

Yes - any value <= 0 will do the trick disabling it. (I've updated the
docs to make this a bit more obvious)

BTW the ActiveMQ client should be sending keep alive packets over the
socket to keep it alive - so if you are getting closed sockets due to
inactivity, it may be an effect of some other issue (like blocked
operating system sockets or other networking strangeness).  So it just
may delay the inevitable (e.g. the OS realising a socket is dead after
1-24 hours). The real fix is to use failover: so that the JMS provider
automatically reconnects



View raw message