activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Tully (JIRA)" <j...@apache.org>
Subject [jira] [Reopened] (AMQ-4656) Pending Queue Counter is incorrect when using durable topics
Date Tue, 11 Mar 2014 15:11:57 GMT

     [ https://issues.apache.org/jira/browse/AMQ-4656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Tully reopened AMQ-4656:
-----------------------------

      Assignee: Gary Tully  (was: Dejan Bosanac)
    Regression: Regression

there is an issue with the cast introduced in the fix for this issue.{code}javax.jms.JMSException:
org.apache.activemq.broker.region.cursors.FilePendingMessageCursor cannot be cast to org.apache.activemq.broker.region.cursors.StoreDurableSubscriberCursor
	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
	at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1408)
	at org.apache.activemq.ActiveMQSession.syncSendPacket(ActiveMQSession.java:1983)
	at org.apache.activemq.ActiveMQMessageConsumer.<init>(ActiveMQMessageConsumer.java:275)
	at org.apache.activemq.ActiveMQTopicSubscriber.<init>(ActiveMQTopicSubscriber.java:117)
	at org.apache.activemq.ActiveMQSession.createDurableSubscriber(ActiveMQSession.java:1384)
	at org.apache.activemq.ActiveMQSession.createDurableSubscriber(ActiveMQSession.java:1320)
	at org.apache.activemq.bugs.AMQ4656Test.testDurableConsumerEnqueueCountWithZeroPrefetch(AMQ4656Test.java:102)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runners.Suite.runChild(Suite.java:127)
	at org.junit.runners.Suite.runChild(Suite.java:26)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.ClassCastException: org.apache.activemq.broker.region.cursors.FilePendingMessageCursor
cannot be cast to org.apache.activemq.broker.region.cursors.StoreDurableSubscriberCursor
	at org.apache.activemq.broker.region.DurableTopicSubscription.activate(DurableTopicSubscription.java:164)
	at org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:159)
	at org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:400)
	at org.apache.activemq.broker.jmx.ManagedRegionBroker.addConsumer(ManagedRegionBroker.java:244)
	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)
	at org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:101)
	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)
	at org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:97)
	at org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:102)
	at org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:618)
	at org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:349)
	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:148)
	at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
	at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
	at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:270)
	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83){code}
will add a trivial fix and test because this is a regression. It is not clear when the file
pending message cursor is advisable, but if folks have a good reason we don't want to break
their existing config. 

> Pending Queue Counter is incorrect when using durable topics
> ------------------------------------------------------------
>
>                 Key: AMQ-4656
>                 URL: https://issues.apache.org/jira/browse/AMQ-4656
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 5.8.0
>            Reporter: Timothy Bish
>            Assignee: Gary Tully
>             Fix For: 5.9.0
>
>         Attachments: AMQ4656Test.java
>
>
> When using a durable topics the Pending Queue Counter provides an incorrect value for
pending messages.
> Steps to recreate
> Set up the durable subscriber
> {noformat}
> ant consumer -Durl=tcp://localhost:61616 -Dtopic=true -Dsubject=MYSUB -Ddurable=true
-Dmax=2
> {noformat}
> Stop the subscriber
> Send 20 persistent messages
> {noformat}
> ant producer -Ddurable=true -Durl=tcp://localhost:61616 -Dtopic=true -Dsubject=MYSUB
-Dmax=20
> {noformat}
> Consume 2 messages
> {noformat}
> ant consumer -Durl=tcp://localhost:61616 -Dtopic=true -Dsubject=MYSUB -Ddurable=true
-Dmax=2
> {noformat}
> View the counter stats.
> The result is the following:
> {noformat}
> Pending Queue Size = 38
> Dispatched Queue Size = 0
> Dispatched Counter = 20
> Enqueue Counter = 20
> Dequeue Counter = 2
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message