Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-1687

Error with virtual topic with more than one consumer name

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 5.1.0
    • 5.3.0
    • Broker
    • None
    • Activemq 5.1.0 (04/23/08). java 1.6.0_02.

    • Regression

    Description

      Tried upgrading to 5.1 today. Seems virtual topics are broken with more than one different consumer name/queue. This is a show-stopper for us as we're using this feature fairly heavily in 4.1 (with some issues, but none like this).

      ERROR Service - Async error occurred: java.lang.ClassCastException: org.apache.activemq.broker.region.Topic cannot be cast to org.apache.activemq.broker.region.Queue
      java.lang.ClassCastException: org.apache.activemq.broker.region.Topic cannot be cast to org.apache.activemq.broker.region.Queue
      at org.apache.activemq.broker.region.QueueSubscription.acknowledge(QueueSubscription.java:50)
      at org.apache.activemq.broker.region.PrefetchSubscription.acknowledge(PrefetchSubscription.java:224)
      at org.apache.activemq.broker.region.AbstractRegion.acknowledge(AbstractRegion.java:359)
      at org.apache.activemq.broker.region.RegionBroker.acknowledge(RegionBroker.java:470)
      at org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:194)
      at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:73)
      at org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:73)
      at org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:84)
      at org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:443)
      at org.apache.activemq.command.MessageAck.visit(MessageAck.java:196)
      at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292)
      at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:180)
      at org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
      at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:143)
      at org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:206)
      at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
      at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
      at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
      at java.lang.Thread.run(Thread.java:619)

      This can be reproduced by modifying the existing VirtualTopicPubSubTest as attached (have two different consumer names). I could not get it to error with an internal broker. The easiest way to reproduce is to start an external broker and then run the attached test. It seems to be important that the broker start clean.

      Attachments

        1. ASF.LICENSE.NOT.GRANTED--VirtualTopicPubSubTest.java
          4 kB
          Kevin McLaughlin
        2. GenericConsumer.java
          3 kB
          Aaron Mulder

        Activity

          People

            rajdavies Robert Davies
            krm1312 Kevin McLaughlin
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: