activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mserrano <>
Subject Re: messages sometimes lost during pure master/slave failover
Date Fri, 03 Jun 2011 14:55:09 GMT
We are using the ActiveMQ in an embedded mode in our application.  It may be
difficult to reproduce in a test case because of the intermittent nature...

On inspection of the code below (from, it seems that an
exception syncing to the slave is logged but otherwise ignored.  Doesn't
this allow the send to return to the client successfully even if the sync
didn't occur?  This seems like a bad thing.

   * @param context
   * @param message
   * @throws Exception
  public void send(ProducerBrokerExchange producerExchange, Message message)
throws Exception {
     * A message can be dispatched before the super.send() method returns so
     * here the order is switched to avoid problems on the slave with
     * receiving acks for messages not received yet
    super.send(producerExchange, message);


    protected void sendSyncToSlave(Command command) {
        try {
            Response response = (Response)slave.request(command);
            if (response.isException()) {
                ExceptionResponse er = (ExceptionResponse)response;
                LOG.error("Slave Failed", er.getException());
        } catch (Throwable e) {
            LOG.error("Slave Failed", e);

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message