1 Reply Latest reply on Dec 12, 2008 4:09 AM by rdavies

    Dropped messages on broker restart

    ichompmessages

      I am having an issue with my Fuse 5.0.0.9 brokers that sometimes causes them to drop messages when they are restarted.  It seems that about half the time they just don't recover any messages out of the store upon startup.

       

      My broker configuration looks like this:

      <beans
      xmlns="http://www.springframework.org/schema/beans"
      xmlns:amq="http://activemq.org/config/1.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
      http://activemq.org/config/1.0 http://activemq.apache.org/schema/activemq-core.xsd
      http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
      <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
      <broker xmlns="http://activemq.org/config/1.0" brokerName="sonic2" persistent="true" dataDirectory="${activemq.base}/data">
      <address></address>
      <transportConnectors>
      <transportConnector name="openwire" uri="tcp://localhost:61616"  discoveryUri="multicast://default"/>
      </transportConnectors>
      <managementContext>
      <managementContext connectorPort="1599" jmxDomainName="org.apache.activemq"/>
      </managementContext>
      </broker>
      </beans>

       

      Here is an example of the startup log when it does not recover messages that should be there:

      ACTIVEMQ_HOME: /opt/mqserver/server

      ACTIVEMQ_BASE: /opt/mqserver/server

      Loading message broker from: xbean:activemq.xml

      INFO  BrokerService                  - Using Persistence Adapter: AMQPersistenceAdapter(activemq-data)

      INFO  BrokerService                  - ActiveMQ 5.0.0.9-fuse JMS Message Broker (campusbroker) is starting

      INFO  BrokerService                  - For help or more information please see: http://activemq.apache.org/

      INFO  AMQPersistenceAdapter          - AMQStore starting using directory: activemq-data

      INFO  ManagementContext              - JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1599/jmxrmi

      INFO  KahaStore                      - Kaha Store using data directory activemq-data/kr-store/state

      INFO  AMQPersistenceAdapter          - Active data files: []

      INFO  KahaStore                      - Kaha Store using data directory activemq-data/kr-store/data

      INFO  TransportServerThreadSupport   - Listening for connections at: tcp://campusbroker.messagemuncher.com:61616

      INFO  TransportConnector             - Connector openwire Started

      INFO  BrokerService                  - ActiveMQ JMS Message Broker (messagemuncher, ID:campusbroker.messagemuncher.com-64443-1208544205794-0:0) started

       

      Here is an example of the starup log when it does recover the messages it should:

      ACTIVEMQ_HOME: /opt/mqserver/server

      ACTIVEMQ_BASE: /opt/mqserver/server

      Loading message broker from: xbean:activemq.xml

      INFO  BrokerService                  - Using Persistence Adapter: AMQPersistenceAdapter(activemq-data)

      INFO  BrokerService                  - ActiveMQ 5.0.0.9-fuse JMS Message Broker (messagemuncher) is starting

      INFO  BrokerService                  - For help or more information please see: http://activemq.apache.org/

      INFO  AMQPersistenceAdapter          - AMQStore starting using directory: activemq-data

      INFO  KahaStore                      - Kaha Store using data directory activemq-data/kr-store/state

      INFO  ManagementContext              - JMX consoles can connect to service:jmx:rmi:///jndi/rmi://localhost:1599/jmxrmi

      INFO  AMQPersistenceAdapter          - Active data files: []

      WARN  AMQPersistenceAdapter          - The ReferenceStore is not valid - recovering ...

      INFO  KahaStore                      - Kaha Store successfully deleted data directory activemq-data/kr-store/data

      INFO  AMQPersistenceAdapter          - Journal Recovery Started from: DataManager:(data-)

      INFO  KahaStore                      - Kaha Store using data directory activemq-data/kr-store/data

      INFO  AMQPersistenceAdapter          - Recovered 2271 operations from redo log in 2.108 seconds.

      INFO  AMQPersistenceAdapter          - Finished recovering the ReferenceStore

      INFO  TransportServerThreadSupport   - Listening for connections at: tcp://campusbroker.messagemuncher.com:61616

      INFO  TransportConnector             - Connector openwire Started

      INFO  BrokerService                  - ActiveMQ JMS Message Broker (messagemuncher, ID:campusbroker.messagemuncher.com-65173-1208435636025-0:0) started

       

      Any help or suggestions would be appreciated.

      Thanks.

       

      Edited by: ichompmessages on Apr 21, 2008 4:00 PM

       

      Edited by: ichompmessages on Apr 21, 2008 4:02 PM

       

      Edited by: ichompmessages on Apr 21, 2008 4:04 PM