activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Vas Dias <jason.vas.d...@gmail.com>
Subject Re: how to disable InactivityMonitor with ActiveMQ 5.7.0.fuse-71-047 ?
Date Tue, 14 Jul 2015 14:37:05 GMT
On 14/07/2015, Christopher Shannon <christopher.l.shannon@gmail.com> wrote:
> The useInactivityMonitor option appears to have been added in 5.3.0 and
> maxInactivityDuration even earlier than that.
>

Yes, but they do not work!

> You can set the properties on your connection string in the client.
>
> For example:
>
> tcp://localhost:61616?transport.useInactivityMonitor=false&wireformat.
> maxInactivityDuration=0
>

Actually, if you try to use that string in an XML configuration file,
you'll get a SAX Parser
exception : parameters in the URL must be separated by ';' , not '&' .

As I stated in my original post, I AM using a server configuration URL of :


 <transportConnectors>
    <transportConnector
uri="tcp://localhost:${com.newbay.whitelabel.ContentIngestionTestSuite.ports.sal_vm.jms_broker}?jms.prefetchPolicy.all=1;transport.useInactivityMonitor=false;wireFormat.maxInactivityDuration=0;"/>
  </transportConnectors>

But this has no effect. If I try and add ampersands to the above URL I
get a SAX XML parser
exception.

Also as stated in my original mail I am unable to add parameters to
the client connection URL .

I am now focusing on trying to rebuild ActiveMQ with the
InactivityMonitor disabled by
default because of this issue.

Any known workarounds ?

>
> On Tue, Jul 14, 2015 at 9:52 AM, Jason Vas Dias <jason.vas.dias@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.dias@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
>> >
>>
>

Mime
View raw message