Uploaded image for project: 'FUSE Message Broker'
  1. FUSE Message Broker
  2. MB-1032

NPE in LastImageSubscriptionRecoveryPolicy

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 5.5.1-fuse-01-06
    • Fix Version/s: 5.5.1-fuse-02-02
    • Component/s: None
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      Hi,

      In the attached test case, I have a broker with a topic configured to use a lastImageSubscriptionRecoveryPolicy. When the broker is first started and a consumer subscribes to the queue and ends without receiving any messages (there are none there), the following Warning shows up which is ok, however, the NullPointer exception isn't so great:

      2011-12-02 15:01:00,588 | WARN  | Failed to browse Topic: grid.config.metricOutput.EGEE.roc.DEV-3607 | org.apache.activemq.broker.region.Topic | ActiveMQ Broker[activemq_gridmsg105.cern.ch] Scheduler
      java.lang.NullPointerException
      	at org.apache.activemq.broker.region.policy.LastImageSubscriptionRecoveryPolicy.browse(LastImageSubscriptionRecoveryPolicy.java:63)
      	at org.apache.activemq.broker.region.Topic.browse(Topic.java:564)
      	at org.apache.activemq.broker.region.Topic$6.run(Topic.java:659)
      	at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
      2011-12-02 15:01:05,274 | DEBUG | Checkpoint started. | org.apache.activemq.store.kahadb.MessageDatabase | ActiveMQ Journal Checkpoint Worker
      2011-12-02 15:01:05,318 | DEBUG | Checkpoint done. | org.apache.activemq.store.kahadb.MessageDatabase | ActiveMQ Journal Checkpoint Worker
      .....
      2011-12-02 15:01:30,584 | WARN  | Failed to browse Topic: grid.config.metricOutput.EGEE.roc.DEV-3607 | org.apache.activemq.broker.region.Topic | ActiveMQ Broker[activemq_gridmsg105.cern.ch] Scheduler
      java.lang.NullPointerException
      	at org.apache.activemq.broker.region.policy.LastImageSubscriptionRecoveryPolicy.browse(LastImageSubscriptionRecoveryPolicy.java:63)
      	at org.apache.activemq.broker.region.Topic.browse(Topic.java:564)
      	at org.apache.activemq.broker.region.Topic$6.run(Topic.java:659)
      	at org.apache.activemq.thread.SchedulerTimerTask.run(SchedulerTimerTask.java:33)
      	at java.util.TimerThread.mainLoop(Timer.java:512)
      	at java.util.TimerThread.run(Timer.java:462)
       

      It takes about 30 seconds after the consumer ends for these messages to start appearing and they continue to appear every 30 seconds until some messages are sent. Then they stop.

      To reproduce this, please download the attached zip file:

      1. Start the broker (script here to make it easy startBroker1.sh )
      2. run ant stomp-subscribe which is a variant of the demo we ship. It simply subscribes to the topic and exits.
      3. Wait about 30 seconds. Messages start showing up in the log/console
      4. Wait for a few of them to show up and then run stomp-send to drop a few messages out there. The messages subside.

        Gliffy Diagrams

          Activity

          Hide
          garytully Gary Tully added a comment -

          fix applied to 5.5.*-fuse branches

          Show
          garytully Gary Tully added a comment - fix applied to 5.5.*-fuse branches

            People

            • Assignee:
              stlewis Stan Lewis
              Reporter:
              sjavurek Susan Javurek
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: