activemq-dev mailing list archives

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

    [ https://issues.apache.org/jira/browse/AMQ-4523?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13652019#comment-13652019
] 

hengyunabc commented on AMQ-4523:
---------------------------------

Maybe I did not show the problem clear.
I know that topic will not save persistent messages before durable subscriber registers.
1. I register a durable subscriber("bar1") on the topic(,
2. Send 1000 persistent messages to the topic("test_topic"),
3. Use camel route to transport message from "bar1" to a queue("test_queue")

The result:
The topic "test_topic" :
Messages Enqueued : 1000

The durable subscriber "bar1" :
Pending Queue Size : 7
Enqueue Counter : 1000
Dequeue Counter : 993

The queue "test_queue":
Number Of Pending Messages : 993

The 7 messages lost, they will alaways "pending in the durable subscriber". 
There are no way to get them, although they are still in the kahadb data files.(db-1.log)

I have try these ways:
1. restart the activemq server, the camel route working , but the pending message still pending
in "bar1".
2. stop the camel route. start a client with clientID:1, name:"bar1", to get message from
the durable subscriber "bar1". It do not work, get nothing.





                
> 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:
> {code}
> ant -Durl=tcp://ip:port  -Dtopic=true -Dsubject=test_topic -Ddurable=true -Dmax=10000
-DmessageSize=100 -DparallelThread=10 -Dverbose=false producer
> {code}
> 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" still not 0!
> Some messages lost, pending in the durable subscriber.
> No matter restart the activemq server, or consume all the messages from 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