Effective October 27, 2012, online and email support for FuseSource products will move to Red Hat support channels. For more information, please see the JIRA Migration to Red Hat FAQ.
As of October 27th, please open all new issues in the Red Hat Customer Portal .
Issue Details (XML | Word | Printable)

Key: MB-1032
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Stan Lewis
Reporter: Susan Javurek
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
FUSE Message Broker

NPE in LastImageSubscriptionRecoveryPolicy

Created: 02/Dec/11 08:27 PM   Updated: 16/Dec/11 11:25 AM
Component/s: None
Affects Version/s: 5.5.1-fuse-01-06
Fix Version/s: 5.5.1-fuse-02-02

File Attachments: 1. Zip Archive dev-3607.zip (15 kB)


External Issue URL: https://issues.apache.org/jira/browse/AMQ-3622


 Description  « Hide
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.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Gary Tully added a comment - 16/Dec/11 11:25 AM
fix applied to 5.5.*-fuse branches