activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "hengyunabc (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMQ-4523) The durable subscriber will lose some pending queue message
Date Wed, 08 May 2013 12:03:20 GMT
hengyunabc created AMQ-4523:
-------------------------------

             Summary: The durable subscriber will lose some pending queue message 
                 Key: AMQ-4523
                 URL: https://issues.apache.org/jira/browse/AMQ-4523
             Project: ActiveMQ
          Issue Type: Bug
          Components: activemq-camel, Broker
    Affects Versions: 5.8.0
            Reporter: hengyunabc


With camel route, forward messages from a topic to a queue.
Just start a topic producer, such as:
ant -Durl=tcp://ip:port  -Dtopic=true -Dsubject=test_topic -Ddurable=true -Dmax=10000 -DmessageSize=100
-DparallelThread=10 -Dverbose=false producer
After a while, in web console: /admin/subscribers.jsp ,can see "Pending Queue Size" not 0.

Then stop the topic producer, will found that the "Pending Queue Size" not 0!
Some messages lost.
No matter restart the activemq server, or consumer all the messages in the queue, can not
get "The Pending Queue Messages'.
camel.xml:
{code}
<beans
   xmlns="http://www.springframework.org/schema/beans"  
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="
     http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
     http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
  
    <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">

        <!-- You can use Spring XML syntax to define the routes here using the <route>
element -->
        <route id="testRoute">
            <description>test Route</description>
            <from uri="jms1:topic:test_topic?clientId=1&amp;durableSubscriptionName=bar1"/>
            <to uri="jms1:queue:test_queue"/>
        </route>

    </camelContext>

	<bean id="jms1" class="org.apache.camel.component.jms.JmsComponent">
	  <property name="configuration" ref="jmsConfig1" />
	</bean>
		      
	<bean id="jmsConfig1" class="org.apache.camel.component.jms.JmsConfiguration" >
	  <property name="connectionFactory" ref="jmsPooledConnectionFactory1" />
	  <property name="transacted" value="true" />
	  <property name="transactionManager" ref="jmsTransactionManager1" />
	  <property name="cacheLevelName" value="CACHE_CONNECTION" />
	  <property name="cacheLevel" value="1" />
	</bean>
	<bean id="jmsTransactionManager1" class="org.springframework.jms.connection.JmsTransactionManager">
	  <property name="connectionFactory" ref="jmsPooledConnectionFactory1" />
	 </bean>        
	<bean id="jmsPooledConnectionFactory1" class="org.apache.activemq.pool.PooledConnectionFactory"
	      init-method="start" destroy-method="stop" >
	  <property name="maxConnections" value="1" />
	  <property name="connectionFactory" ref="jmsConnectionFactory1" />
	</bean>
	<bean id="jmsConnectionFactory1" class="org.apache.activemq.ActiveMQConnectionFactory">
	  <property name="brokerURL" value="vm://localhost?create=false&amp;jms.prefetchPolicy.all=1"
/>
	  <property name="watchTopicAdvisories" value="false" />
	</bean>

</beans>
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message