My workaround:  if ( message != NULL ) ....

p<IMessage> MessageConsumer::autoAcknowledge(p<IMessage> message)
{
    try
    {
        if ( message != NULL ) {
          // Is the message an ActiveMQMessage? (throws bad_cast otherwise)
          p<ActiveMQMessage> activeMessage = p_dyncast<ActiveMQMessage>
(message) ;

          // Register the handler for client acknowledgment
          activeMessage->setAcknowledger( smartify(this) ) ;

          if( acknowledgementMode != ClientAckMode )
              doAcknowledge(activeMessage) ;
        }
    }
    catch( bad_cast& bc )
    {
        // ignore
    }
    return message ;
}

-- 
View this message in context: 
http://www.nabble.com/Bug-in-MessageConsumer%3A%3Areceive-tf1936063.html#a5304689
Sent from the ActiveMQ - Dev forum at Nabble.com.

Reply via email to