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

Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.5.1
    • 5.8.0
    • Broker
    • None

    Description

      Non Durable Topic subscription with prefetch=0, MessageConsumer.receivenowait() (or MessageConsumer.receive(timeout) hangs indefinitely.

      I get the following thread dump

      "main" prio=5 tid=7f996d000000 nid=0x105bc3000 in Object.wait() [105bc1000]
         java.lang.Thread.State: WAITING (on object monitor)
      	at java.lang.Object.wait(Native Method)
      	- waiting on <7f39f1b30> (a java.lang.Object)
      	at java.lang.Object.wait(Object.java:485)
      	at org.apache.activemq.SimplePriorityMessageDispatchChannel.dequeue(SimplePriorityMessageDispatchChannel.java:87)
      	- locked <7f39f1b30> (a java.lang.Object)
      	at org.apache.activemq.ActiveMQMessageConsumer.dequeue(ActiveMQMessageConsumer.java:468)
      	at org.apache.activemq.ActiveMQMessageConsumer.receiveNoWait(ActiveMQMessageConsumer.java:621)
      	at org.apache.activemq.usecases.TopicSubscriptionZeroPrefetchTest.testTopicConsumerPrefetchZero(TopicSubscriptionZeroPrefetchTest.java:71)
      

      It seems the TopicSubscription does not support "pullMessage".

      This only appears to impact Non Durable Topic Subscriptions. Durable Topic Subscriptions with prefetch=0 do NOT exhibit this behavior.

      Attachments

        1. AMQ-3746.txt
          13 kB
          Timothy A. Bish
        2. APotentialFixForAMQ-3746.patch
          5 kB
          Pat Fox
        3. TopicSubscriptionZeroPrefetchTest.patch
          4 kB
          Pat Fox

        Activity

          People

            tabish Timothy A. Bish
            pgfox Pat Fox
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: