activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jberney <joshua.f.ber...@jpmchase.com>
Subject QueueBrowsing with MasterSlave Problem
Date Thu, 04 May 2006 13:51:37 GMT

All,
     I am attempting to browse queues while using master slave. Every time I
attempt to browse a queue a null pointer exception is thrown by the master
broker (it is visible in stdout from Master Broker) and the getEnumeration()
call never returns. If I do not start the slave broker, this exact code
works perfectly. It does not matter if messages have or have not been added
to the queue.

I am currently using 4.0 final release candidate, but I see the exact same
problem (with slightly different line numbers in the exception) using 4.0
RC2. Also, I have retroactive consumer set in the connection factory.

Master Broker Exception:
Exception in thread "ActiveMQ Task" java.lang.NullPointerException
        at
org.apache.activemq.broker.ft.MasterBroker.processDispatch(MasterBroker.java:288)
        at
org.apache.activemq.broker.MutableBrokerFilter.processDispatch(MutableBrokerFilter.java:194)
        at
org.apache.activemq.broker.AbstractConnection.processDispatch(AbstractConnection.java:580)
        at
org.apache.activemq.broker.AbstractConnection.iterate(AbstractConnection.java:598)
        at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:110)
        at
org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:25)
        at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)

Code to create browse:
 this.browser = this.connection.createSession(false,
javax.jms.Session.AUTO_ACKNOWLEDGE).createBrowser((Queue) queue);
this.browser.getEnumeration();

Connect string:
failover://(tcp://<masterhostname>:61635,tcp://<slavehostname>:61635)?randomize=false

Master config:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:amq="http://activemq.org/config/1.0">

        <amq:broker name="broker" persistent="false" useJmx="true"
useShutdownHook="true" deleteAllMessagesOnStartup="true">
                <amq:transportConnectors>
                        <amq:transportConnector uri="tcp://0.0.0.0:61635" />
                </amq:transportConnectors>

     <amq:memoryManager>
                <amq:usageManager limit="1000000000" /> <!-- size in bytes
-->
        </amq:memoryManager>

     </amq:broker>

</beans>

Slave config:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:amq="http://activemq.org/config/1.0">
        <amq:broker name="slave"
masterConnectorURI="tcp://<masterhostname>:61635"
shutdownOnMasterFailure="false" persistent="false" useJmx="true"
useShutdownHook="true" deleteAllMessagesOnStartup="true">
              <amq:transportConnectors>
                        <amq:transportConnector uri="tcp://0.0.0.0:61635" />
                </amq:transportConnectors>
  <amq:memoryManager>
                <amq:usageManager limit="1000000000" /> <!-- size in bytes
-->
        </amq:memoryManager>
</amq:broker>

</beans>

--
View this message in context: http://www.nabble.com/QueueBrowsing-with-MasterSlave-Problem-t1557136.html#a4229516
Sent from the ActiveMQ - User forum at Nabble.com.


Mime
View raw message