You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Dhirendra Rai <dh...@globallogic.com> on 2008/10/30 07:00:42 UTC

Pending Messages are shown in ActiveMQ

Hi,

I am using activemq 5.1.0 with spring 2.3 . 
The isssue I am facing is : At the time of load testing some set of messages
are not getting consumed by the consumer they are shown in the pending list.
e.g Total Messages=200, Received Messages=180 Pending Messages=20.
The pending messages count goes on increasing if i fire another set of
messages like
now Total Messages=400, Received Messages=280 Pending Messages=120.

My consumer configuration is
<bean id="inputMessageReceiver"
		class="com.sybase.map.mapservice.impl.InputMessageReceiver">		
	</bean>

	<bean id="inputQueueContainer"
		class="org.springframework.jms.listener.DefaultMessageListenerContainer">
		<property name="connectionFactory" ref="jmsConnectionFactory" />
		<property name="messageListener" ref="inputMessageReceiver" />
		<property name="destination" ref="jmsInputQueue" />
		<property name="sessionTransacted" value="true" />
		<property name="concurrentConsumers">
			<value>5</value>
		</property>
		<property name="receiveTimeout" value="5000" />
		<property name="recoveryInterval" value="120000" />
		<property name="transactionManager" ref="jmsTransactionManager" />
	</bean>

Please help.
-- 
View this message in context: http://www.nabble.com/Pending-Messages-are-shown-in-ActiveMQ-tp20241332p20241332.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Pending Messages are shown in ActiveMQ

Posted by Gary Tully <ga...@gmail.com>.
In case you don't have the download details, see:
http://www.nabble.com/-VOTE--ActiveMQ-5.2.0---RC3-tt20360233.html

2008/11/13 Edward Ye <ed...@21cn.com>:
>
> OK, I read some advices in another thread. I would like to try a test on
> ActiveMQ 5.2.0 RC3.
>
>
> Edward Ye wrote:
>>
>> Hi,I am facing similar issue as I said in this
>> thread(http://www.nabble.com/Consumer-Listener-stop-receving-message-until-ActiveMQ-restart-to20355247.html).
>> Can anybody help us out?
>> Thanks.
>>
>>
>> Dhirendra Rai wrote:
>>>
>>> Hi All,
>>>
>>>      We are facing issue related to ActiveMQ, where
>>> 1. When used in sessionTransacted mode with cacheLevel=3 few of the
>>> messages are not getting consumed (i.e. Pending).
>>>
>>>
>>>
>>> 2. Also message statistics shown on queue console is not proper. i.e. It
>>> shows more number of messages delivered and in few cases negative number
>>>
>>>
>>>
>>> We are using ActiveMQ 5.1 with spring 2.5.3. We are using Springs'
>>> jmstemplate as a producer & DefaultMessageListenerContainer as a
>>> consumer.
>>>
>>>
>>>
>>>
>>> Container configuration is as follows:
>>>
>>> <bean id="deliveryHandlerContainer"
>>>
>>>
>>> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>>>
>>>           <property name="connectionFactory" ref="jmsConnectionFactory"
>>> />
>>>
>>>           <property name="messageListener" ref="deliveryHandler" />
>>>
>>>           <property name="destination" ref="deliveryQueue" />
>>>
>>>           <property name="sessionTransacted" value="true" />
>>>
>>>           <property name="concurrentConsumers">
>>>
>>>                      <value>${deliveryqueue.concurrentConsumers}</value>
>>>
>>>           </property>
>>>
>>>           <property name="receiveTimeout" value="5000" />
>>>
>>>           <property name="recoveryInterval" value="120000" />
>>>
>>>           <property name="transactionManager" ref="jmsTransactionManager"
>>> />
>>>
>>>           <property name="cacheLevel" value="3"/>
>>>
>>> </bean>
>>>
>>>
>>> Quick pointers and inputs appreciated!
>>>
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/Pending-Messages-are-shown-in-ActiveMQ-tp20241332p20481618.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>

Re: Pending Messages are shown in ActiveMQ

Posted by Edward Ye <ed...@21cn.com>.
OK, I read some advices in another thread. I would like to try a test on
ActiveMQ 5.2.0 RC3.


Edward Ye wrote:
> 
> Hi,I am facing similar issue as I said in this
> thread(http://www.nabble.com/Consumer-Listener-stop-receving-message-until-ActiveMQ-restart-to20355247.html).
> Can anybody help us out?
> Thanks.
> 
> 
> Dhirendra Rai wrote:
>> 
>> Hi All,
>> 
>>      We are facing issue related to ActiveMQ, where 
>> 1. When used in sessionTransacted mode with cacheLevel=3 few of the
>> messages are not getting consumed (i.e. Pending). 
>> 
>>  
>> 
>> 2. Also message statistics shown on queue console is not proper. i.e. It
>> shows more number of messages delivered and in few cases negative number
>> 
>>  
>> 
>> We are using ActiveMQ 5.1 with spring 2.5.3. We are using Springs’
>> jmstemplate as a producer & DefaultMessageListenerContainer as a
>> consumer. 
>> 
>> 
>>  
>> 
>> Container configuration is as follows: 
>> 
>> <bean id="deliveryHandlerContainer"
>> 
>>          
>> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>> 
>>           <property name="connectionFactory" ref="jmsConnectionFactory"
>> />
>> 
>>           <property name="messageListener" ref="deliveryHandler" />
>> 
>>           <property name="destination" ref="deliveryQueue" />
>> 
>>           <property name="sessionTransacted" value="true" />
>> 
>>           <property name="concurrentConsumers">
>> 
>>                      <value>${deliveryqueue.concurrentConsumers}</value>
>> 
>>           </property>
>> 
>>           <property name="receiveTimeout" value="5000" /> 
>> 
>>           <property name="recoveryInterval" value="120000" />
>> 
>>           <property name="transactionManager" ref="jmsTransactionManager"
>> />
>> 
>>           <property name="cacheLevel" value="3"/>
>> 
>> </bean> 
>> 
>> 
>> Quick pointers and inputs appreciated!
>> 
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Pending-Messages-are-shown-in-ActiveMQ-tp20241332p20481618.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Pending Messages are shown in ActiveMQ

Posted by Edward Ye <ed...@21cn.com>.
Hi,I am facing similar issue as I said in this
thread(http://www.nabble.com/Consumer-Listener-stop-receving-message-until-ActiveMQ-restart-to20355247.html).
Can anybody help us out?
Thanks.


Dhirendra Rai wrote:
> 
> Hi All,
> 
>      We are facing issue related to ActiveMQ, where 
> 1. When used in sessionTransacted mode with cacheLevel=3 few of the
> messages are not getting consumed (i.e. Pending). 
> 
>  
> 
> 2. Also message statistics shown on queue console is not proper. i.e. It
> shows more number of messages delivered and in few cases negative number
> 
>  
> 
> We are using ActiveMQ 5.1 with spring 2.5.3. We are using Springs’
> jmstemplate as a producer & DefaultMessageListenerContainer as a consumer. 
> 
> 
>  
> 
> Container configuration is as follows: 
> 
> <bean id="deliveryHandlerContainer"
> 
>          
> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
> 
>           <property name="connectionFactory" ref="jmsConnectionFactory" />
> 
>           <property name="messageListener" ref="deliveryHandler" />
> 
>           <property name="destination" ref="deliveryQueue" />
> 
>           <property name="sessionTransacted" value="true" />
> 
>           <property name="concurrentConsumers">
> 
>                      <value>${deliveryqueue.concurrentConsumers}</value>
> 
>           </property>
> 
>           <property name="receiveTimeout" value="5000" /> 
> 
>           <property name="recoveryInterval" value="120000" />
> 
>           <property name="transactionManager" ref="jmsTransactionManager"
> />
> 
>           <property name="cacheLevel" value="3"/>
> 
> </bean> 
> 
> 
> Quick pointers and inputs appreciated!
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Pending-Messages-are-shown-in-ActiveMQ-tp20241332p20481441.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Pending Messages are shown in ActiveMQ

Posted by Dhirendra Rai <dh...@globallogic.com>.
Hi All,

     We are facing issue related to ActiveMQ, where 
1. When used in sessionTransacted mode with cacheLevel=3 few of the messages
are not getting consumed (i.e. Pending). 

 

2. Also message statistics shown on queue console is not proper. i.e. It
shows more number of messages delivered and in few cases negative number

 

We are using ActiveMQ 5.1 with spring 2.5.3. We are using Springs’
jmstemplate as a producer & DefaultMessageListenerContainer as a consumer. 


 

Container configuration is as follows: 

<bean id="deliveryHandlerContainer"

         
class="org.springframework.jms.listener.DefaultMessageListenerContainer">

          <property name="connectionFactory" ref="jmsConnectionFactory" />

          <property name="messageListener" ref="deliveryHandler" />

          <property name="destination" ref="deliveryQueue" />

          <property name="sessionTransacted" value="true" />

          <property name="concurrentConsumers">

                     <value>${deliveryqueue.concurrentConsumers}</value>

          </property>

          <property name="receiveTimeout" value="5000" /> 

          <property name="recoveryInterval" value="120000" />

          <property name="transactionManager" ref="jmsTransactionManager" />

          <property name="cacheLevel" value="3"/>

</bean> 


Quick pointers and inputs appreciated!



-- 
View this message in context: http://www.nabble.com/Pending-Messages-are-shown-in-ActiveMQ-tp20241332p20306175.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Pending Messages are shown in ActiveMQ

Posted by Dhirendra Rai <dh...@globallogic.com>.
Hi,
Thanks for the quick reply.
I have configured the jms.prefetchPolicy.all=1 in the brokerURL but it is
still behaving in the same way.
I am also attaching the activemq.xml file for the configuration we are
using.
We are also using JMStemplate which sends the message to queue.
http://www.nabble.com/file/p20242367/activemq.xml activemq.xml 

<Resource name="jms/broker/CONNECTION_FACTORY" auth="Container"
		type="org.apache.activemq.ActiveMQConnectionFactory"
		description="JMS Connection Factory"
		factory="org.apache.activemq.jndi.JNDIReferenceFactory"
		brokerURL="tcp://172.18.15.101:61616?jms.prefetchPolicy.all=1"
brokerName="SybaseActiveMQBroker"
		useEmbeddedBroker="false"		
		redeliveryPolicy.maximumRedeliveries="3" 
		redeliveryPolicy.useExponentialBackOff="true" 
		redeliveryPolicy.backOffMultiplier="2"/>	



James.Strachan wrote:
> 
> Have you tried lowering prefetch (e.g. setting it to 1) to see if one
> of your consumers is blocked & hogging them?
> http://activemq.apache.org/what-is-the-prefetch-limit-for.html
> 
> 
> 2008/10/30 Dhirendra Rai <dh...@globallogic.com>:
>>
>> Hi,
>>
>> I am using activemq 5.1.0 with spring 2.3 .
>> The isssue I am facing is : At the time of load testing some set of
>> messages
>> are not getting consumed by the consumer they are shown in the pending
>> list.
>> e.g Total Messages=200, Received Messages=180 Pending Messages=20.
>> The pending messages count goes on increasing if i fire another set of
>> messages like
>> now Total Messages=400, Received Messages=280 Pending Messages=120.
>>
>> My consumer configuration is
>> <bean id="inputMessageReceiver"
>>               
>> class="com.sybase.map.mapservice.impl.InputMessageReceiver">
>>        </bean>
>>
>>        <bean id="inputQueueContainer"
>>               
>> class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>>                <property name="connectionFactory"
>> ref="jmsConnectionFactory" />
>>                <property name="messageListener"
>> ref="inputMessageReceiver" />
>>                <property name="destination" ref="jmsInputQueue" />
>>                <property name="sessionTransacted" value="true" />
>>                <property name="concurrentConsumers">
>>                        <value>5</value>
>>                </property>
>>                <property name="receiveTimeout" value="5000" />
>>                <property name="recoveryInterval" value="120000" />
>>                <property name="transactionManager"
>> ref="jmsTransactionManager" />
>>        </bean>
>>
>> Please help.
>> --
>> View this message in context:
>> http://www.nabble.com/Pending-Messages-are-shown-in-ActiveMQ-tp20241332p20241332.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> James
> -------
> http://macstrac.blogspot.com/
> 
> Open Source Integration
> http://fusesource.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/Pending-Messages-are-shown-in-ActiveMQ-tp20241332p20242367.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Pending Messages are shown in ActiveMQ

Posted by James Strachan <ja...@gmail.com>.
Have you tried lowering prefetch (e.g. setting it to 1) to see if one
of your consumers is blocked & hogging them?
http://activemq.apache.org/what-is-the-prefetch-limit-for.html


2008/10/30 Dhirendra Rai <dh...@globallogic.com>:
>
> Hi,
>
> I am using activemq 5.1.0 with spring 2.3 .
> The isssue I am facing is : At the time of load testing some set of messages
> are not getting consumed by the consumer they are shown in the pending list.
> e.g Total Messages=200, Received Messages=180 Pending Messages=20.
> The pending messages count goes on increasing if i fire another set of
> messages like
> now Total Messages=400, Received Messages=280 Pending Messages=120.
>
> My consumer configuration is
> <bean id="inputMessageReceiver"
>                class="com.sybase.map.mapservice.impl.InputMessageReceiver">
>        </bean>
>
>        <bean id="inputQueueContainer"
>                class="org.springframework.jms.listener.DefaultMessageListenerContainer">
>                <property name="connectionFactory" ref="jmsConnectionFactory" />
>                <property name="messageListener" ref="inputMessageReceiver" />
>                <property name="destination" ref="jmsInputQueue" />
>                <property name="sessionTransacted" value="true" />
>                <property name="concurrentConsumers">
>                        <value>5</value>
>                </property>
>                <property name="receiveTimeout" value="5000" />
>                <property name="recoveryInterval" value="120000" />
>                <property name="transactionManager" ref="jmsTransactionManager" />
>        </bean>
>
> Please help.
> --
> View this message in context: http://www.nabble.com/Pending-Messages-are-shown-in-ActiveMQ-tp20241332p20241332.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>



-- 
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/