You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Mike Nooney <no...@gmail.com> on 2009/10/17 07:50:01 UTC

Re: Many TCP consumer threads are being started up but no messages getting to queue

Hi,

great, thanks, that helped. 

When I removed the jms appender from the root logger in log4j.props all
worked fine.
However I need to use the jms appender on the root logger as the webapp was
developed by a 3rd party and quite a lot is logged using the root logger. I
tried using log4j.additivity.org.apache.activemq=false to prevent root
logger from inheriting logs from descendent logger. This worked for most
activemq logs. 

However there are still a few activemq log statements being caught by the
root logger preventing me
from using the jms appender against root.

Using the config below does not help with these statements. It appears to be
the 'handshaking'
that happens before the first message is sent to the queue.

Could anyone help with this?

Thanks,
Mike

The statements are:
--------------------------------------------------------------------------------------------------
2009-10-17 17:30:35,951 [Thread-8] DEBUG
org.apache.activemq.transport.WireFormatNegotiator - Sending: WireFormatInfo
{ version=3, properties={TightEncodingEnabled=true, CacheSize=1024,
TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true,
MaxInactivityDurationInitalDelay=10000, MaxInactivityDuration=30000,
CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}

2009-10-17 17:30:35,966 [ActiveMQ Transport:
tcp://localhost/127.0.0.1:61616] DEBUG
org.apache.activemq.transport.tcp.TcpTransport - TCP consumer thread for
tcp://localhost/127.0.0.1:61616 starting
2009-10-17 17:30:35,966 [ActiveMQ Transport:
tcp://localhost/127.0.0.1:61616] DEBUG
org.apache.activemq.transport.WireFormatNegotiator - Received WireFormat:
WireFormatInfo { version=3, properties={TightEncodingEnabled=true,
CacheSize=1024, TcpNoDelayEnabled=true, SizePrefixDisabled=false,
StackTraceEnabled=true, MaxInactivityDurationInitalDelay=10000,
MaxInactivityDuration=30000, CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}

2009-10-17 17:30:35,966 [ActiveMQ Transport:
tcp://localhost/127.0.0.1:61616] DEBUG
org.apache.activemq.transport.WireFormatNegotiator -
tcp://localhost/127.0.0.1:61616 before negotiation:
OpenWireFormat{version=3, cacheEnabled=false, stackTraceEnabled=false,
tightEncodingEnabled=false, sizePrefixDisabled=false}

2009-10-17 17:30:35,966 [ActiveMQ Transport:
tcp://localhost/127.0.0.1:61616] DEBUG
org.apache.activemq.transport.WireFormatNegotiator -
tcp://localhost/127.0.0.1:61616 after negotiation: OpenWireFormat{version=3,
cacheEnabled=true, stackTraceEnabled=true, tightEncodingEnabled=true,
sizePrefixDisabled=false}
------------------------------------------------------------------------------------------------------


The new config looks like:
---
log4j.rootLogger=DEBUG, R

log4j.logger.org.apache.activemq=DEBUG,ACTIVEMQ
log4j.additivity.org.apache.activemq=false

where R and ACTIVEMQ are FileAppenders.




Gary Tully wrote:
> 
> possibly add the following to your log4j configuration:
> 
> ## Be sure that ActiveMQ messages are not logged to 'jms' appender
> log4j.logger.org.apache.activemq=INFO, stdout
> 
> 
> see:
> http://activemq.apache.org/how-do-i-use-log4j-jms-appender-with-activemq.html
> 
> 2009/10/10 Mike Nooney <no...@gmail.com>
> 
>>
>> Hi,
>>
>> I am using the Log4j JMSQueueAppender to log to a JMS Queue provided by
>> an
>> ActiveMQ Broker (ActiveMQ V5.2).
>>
>> The logs show that many TCP consumer threads are being started up at the
>> same time. Also no messages are appearing in the queue.
>>
>> Would anyone know if this is a configuration issue or something else?
>>
>> Active MQ configuration here:
>> http://www.nabble.com/file/p25830809/activemq.conf.TXT activemq.conf.TXT
>>
>> Thanks,
>> Mike
>>
>> HOSTNAME - 2009-10-10 16:06:20,229 [Thread-8] DEBUG
>> org.apache.activemq.transport.WireFormatNegotiator - Sending:
>> WireFormatInfo
>> { version=3, properties={TightEncodingEnabled=true, CacheSize=1024,
>> TcpNoDelayEnabled=true, SizePrefixDisabled=false, StackTraceEnabled=true,
>> MaxInactivityDurationInitalDelay=10000, MaxInactivityDuration=30000,
>> CacheEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
>>
>> The above statement appears once.
>>
>> HOSTNAME - 2009-10-10 16:06:20,245 [ActiveMQ Transport:
>> tcp://localhost/127.0.0.1:61616] DEBUG
>> org.apache.activemq.transport.tcp.TcpTransport - TCP consumer thread for
>> tcp://localhost/127.0.0.1:61616 starting
>>
>> The above log statement appears hundreds of times when the webapp loads
>> in
>> the Tomcat server and starts logging.
>>
>> Log4j configuration
>> ##############################JMS appender
>> config###############################
>> # define appender for JMS logger
>> log4j.appender.jms=JMSQueueAppender
>>
>> log4j.appender.jms.InitialContextFactory=org.apache.activemq.jndi.ActiveMQInitialContextFactory
>> log4j.appender.jms.ProviderUrl=tcp://localhost:61616
>> log4j.appender.jms.QueueBindingName=logqueue
>> log4j.appender.jms.QueueConnectionFactoryBindingName=ConnectionFactory
>> log4j.appender.jms.FailsafeLoggerName=jmsFSlogger
>> log4j.appender.jms.AttemptsTillRetry=50000
>> # Set TimeToLive for messages on the queue -1 means no expiry
>> log4j.appender.jms.TimeToLive=-1
>>
>> ################################################################################
>> --
>> View this message in context:
>> http://www.nabble.com/Many-TCP-consumer-threads-are-being-started-up-but-no-messages-getting-to-queue-tp25830809p25830809.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source Integration
> http://fusesource.com
> 
> 

-- 
View this message in context: http://www.nabble.com/Many-TCP-consumer-threads-are-being-started-up-but-no-messages-getting-to-queue-tp25830809p25935631.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.