[
https://issues.apache.org/jira/browse/AMQ-3060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13471548#comment-13471548
]
Piotr Jarzemski commented on AMQ-3060:
--------------------------------------
This situation occurs probably when consumer is trying to durably subscribe to
queue. It can be reproduced in ActiveMQ 5.6.0 using stomp connector. Just try
to connect via stomp giving clientId in connection headers, and
"activemq.subscriptionName" header in subscribe headers. I could try to provide
unit test if it would be helpful.
> java.lang.ClassCastException:
> org.apache.activemq.broker.region.QueueSubscription cannot be cast to
> org.apache.activemq.broker.region.DurableTopicSubscription
> --------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AMQ-3060
> URL: https://issues.apache.org/jira/browse/AMQ-3060
> Project: ActiveMQ
> Issue Type: Improvement
> Affects Versions: 5.4.1
> Reporter: James Green
> Fix For: AGING_TO_DIE
>
>
> I've been asked to create an issue about this, see:
> http://activemq.2283324.n4.nabble.com/Selected-messages-not-being-passed-between-brokers-td3058921.html
> http://activemq.2283324.n4.nabble.com/SOLVED-Re-Selected-messages-not-being-passed-between-brokers-td3062303.html
> It would be very helpful to engineering staff if the following exception were
> given a description to help fix the cause:
> 2010-11-25 03:16:06,111 | ERROR | Failed to register subscription
> QueueSubscription: consumer=ID:zorin-38906-1288633023389-566:1:1:167,
> destinations=0, dispatched=0, delivered=0, pending=0 |
> org.apache.activemq.broker.jmx.ManagedRegionBroker | ActiveMQ Transport:
> ssl://my-host.net/a.b.c.d:61617
> java.lang.ClassCastException:
> org.apache.activemq.broker.region.QueueSubscription cannot be cast to
> org.apache.activemq.broker.region.DurableTopicSubscription
> at
> org.apache.activemq.broker.jmx.DurableSubscriptionView.<init>(DurableSubscriptionView.java:46)
> at
> org.apache.activemq.broker.jmx.ManagedRegionBroker.registerSubscription(ManagedRegionBroker.java:188)
> at
> org.apache.activemq.broker.jmx.ManagedQueueRegion.createSubscription(ManagedQueueRegion.java:45)
> at
> org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:268)
> at
> org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:443)
> at
> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
> at
> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
> at
> org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:91)
> at
> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
> at
> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:89)
> at
> org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:95)
> at
> org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:548)
> at
> org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:349)
> at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:309)
> at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:185)
> at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
> at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)
> at
> org.apache.activemq.transport.vm.VMTransport.dispatch(VMTransport.java:121)
> at
> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:112)
> at
> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
> at
> org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:60)
> at
> org.apache.activemq.network.DemandForwardingBridgeSupport.addSubscription(DemandForwardingBridgeSupport.java:658)
> at
> org.apache.activemq.network.DemandForwardingBridgeSupport.addConsumerInfo(DemandForwardingBridgeSupport.java:1023)
> at
> org.apache.activemq.network.DemandForwardingBridgeSupport.serviceRemoteConsumerAdvisory(DemandForwardingBridgeSupport.java:593)
> at
> org.apache.activemq.network.DemandForwardingBridgeSupport.serviceRemoteCommand(DemandForwardingBridgeSupport.java:492)
> at
> org.apache.activemq.network.DemandForwardingBridgeSupport$2.onCommand(DemandForwardingBridgeSupport.java:173)
> at
> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:116)
> at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:69)
> at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113)
> at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:228)
> at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
> at
> org.apache.activemq.transport.tcp.SslTransport.doConsume(SslTransport.java:91)
> at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:219)
> at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:201)
> at java.lang.Thread.run(Thread.java:619)
> In this case I was attempting to subscribe to a queue while also giving
> connection and subscription headers to make my client into a durable topic
> subscriber. Remove these extra headers and the error above goes away.
> If it is any help, messages are created on broker A (where the log above
> originates) and consumed on broker B. Brokers A and B are SSL connected.
--
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