The useInactivityMonitor option appears to have been added in 5.3.0 and
maxInactivityDuration even earlier than that.

You can set the properties on your connection string in the client.

For example:

tcp://localhost:61616?transport.useInactivityMonitor=false&wireformat.
maxInactivityDuration=0


On Tue, Jul 14, 2015 at 9:52 AM, Jason Vas Dias <jason.vas.d...@gmail.com>
wrote:

> Here's some debug output showing the timeout negotiation from the client:
>
> 2015-07-14 14:27:48,969 [main] DEBUG
> activemq.transport.WireFormatNegotiator  - Sending: WireFormatInfo {
> version=9, properties={MaxFrameSize=9223372036854775807,
> CacheSize=1024, CacheEnabled=true, SizePrefixDisabled=false,
> MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true,
> MaxInactivityDuration=30000, TightEncodingEnabled=true,
> StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
> 2015-07-14 14:27:49,004 [ActiveMQ Transport:
> tcp://localhost/127.0.0.1:61616@43697] DEBUG
> activemq.transport.InactivityMonitor  - Using min of local:
> WireFormatInfo { version=9,
> properties={MaxFrameSize=9223372036854775807, CacheSize=1024,
> CacheEnabled=true, SizePrefixDisabled=false,
> MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true,
> MaxInactivityDuration=30000, TightEncodingEnabled=true,
> StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]} and remote:
> WireFormatInfo { version=9, properties={CacheSize=1024,
> MaxFrameSize=9223372036854775807, CacheEnabled=true,
> SizePrefixDisabled=false, TcpNoDelayEnabled=true,
> MaxInactivityDurationInitalDelay=10000, MaxInactivityDuration=30000,
> TightEncodingEnabled=true, StackTraceEnabled=true},
> magic=[A,c,t,i,v,e,M,Q]}
> 2015-07-14 14:27:49,004 [ActiveMQ Transport:
> tcp://localhost/127.0.0.1:61616@43697] DEBUG
> activemq.transport.WireFormatNegotiator  - Received WireFormat:
> WireFormatInfo { version=9, properties={CacheSize=1024,
> MaxFrameSize=9223372036854775807, CacheEnabled=true,
> SizePrefixDisabled=false, TcpNoDelayEnabled=true,
> MaxInactivityDurationInitalDelay=10000, MaxInactivityDuration=30000,
> TightEncodingEnabled=true, StackTraceEnabled=true},
> magic=[A,c,t,i,v,e,M,Q]}
> 2015-07-14 14:27:49,005 [ActiveMQ Transport:
> tcp://localhost/127.0.0.1:61616@43697] DEBUG
> activemq.transport.WireFormatNegotiator  -
> tcp://localhost/127.0.0.1:61616@43697 before negotiation:
> OpenWireFormat{version=9, cacheEnabled=false, stackTraceEnabled=false,
> tightEncodingEnabled=false, sizePrefixDisabled=false,
> maxFrameSize=9223372036854775807}
> 2015-07-14 14:27:49,005 [ActiveMQ Transport:
> tcp://localhost/127.0.0.1:61616@43697] DEBUG
> activemq.transport.WireFormatNegotiator  -
> tcp://localhost/127.0.0.1:61616@43697 after negotiation:
> OpenWireFormat{version=9, cacheEnabled=true, stackTraceEnabled=true,
> tightEncodingEnabled=true, sizePrefixDisabled=false,
> maxFrameSize=9223372036854775807}
>
> So the server seems to be completely ignoring my specified settings of :
>     transport.useInactivityMonitor=false; maxInactivityDuration=0;
>
> I guess ActiveMQ 5.7.0.x is incapable of disabling its InactivityMonitor ?
> Can anyone confirm or deny this ?
>
> Thanks & Regards,
> Jason
>
> On 14/07/2015, Jason Vas Dias <jason.vas.d...@gmail.com> wrote:
> > Good day -
> >
> > I have an ActiveMQ 5.7.0.fuse-71-047 server setup with this in its
> > at-broker-context.xml
> > (main configuration file) :
> >
> >  <transportConnectors>
> >     <transportConnector
> >
> uri="tcp://localhost:${my_apps_broker_port_property}?jms.prefetchPolicy.all=1;transport.useInactivityMonitor=false;wireFormat.maxInactivityDuration=0;"/>
> >   </transportConnectors>
> >
> > Yet still  when clients connect to the broker, they end up using a
> > non-zero timeout :
> > 2015-07-14 13:48:27,563 [ActiveMQ InactivityMonitor Worker] WARN
> > broker.TransportConnection.Transport  - Transport Connection to:
> > tcp://127.0.0.1:43475 failed:
> > org.apache.activemq.transport.InactivityIOException: Channel was
> > inactive for too (>30000) long: tcp://127.0.0.1:43475
> >
> > Unfortunately, I cannot set any ActiveMQ specific connection
> > properties on the client side,
> > as the clients are using the plain JMS library (javax:jms:1.1-SP1) to
> > get a connection.
> >
> > But the ActiveMQ documentation suggests that if the server has disabled
> the
> > InactivityMonitor, then clients should be unable to negotiate a
> > non-zero timeout :
> >
> > http://activemq.apache.org/activemq-inactivitymonitor.html says:
> > <quote>
> > ...
> > transport.useInactivityMonitor  true    A value of false disables the
> > InactivityMonitor completely and connections will never time out. By
> > default it is enabled.
> > ...
> > At startup the InactivityMonitor negotiates the appropriate
> > maxInactivityDuration and maxInactivityDurationInitalDelay. The
> > shortest duration is taken for the connection.
> > ...
> > Setting transport.useInactivityMonitor=false will disable the
> > InactivityMonitor. Configuring wireFormat.maxInactivityDuration=0 will
> > achieve the same result.
> > </quote>
> >
> > None of the statements made in the documentation appear to be true in my
> > case.
> >
> > I am now looking at producing a patched version of
> > ActiveMQ-5.7.0.fuse-71-047 that completely removes and disables the
> > InactivityMonitor because of this issue.
> >
> > Would anyone have any suggestions as to how the InactivityMonitor
> > might be disabled
> > in the SERVER configuration with ActiveMQ 5.7.0 ?  Changing ActiveMQ
> > version
> > is not an option.
> >
> > Thanks & Regards,
> > Jason
> >
>

Reply via email to