Hi,

 

I am trying to see if "isConnectionInfo() and isRemoveInfo()" methods
are working fine. Created a consumer with a destination
"ActiveMQ.Advisory.Connection" and implemented following code in
onMessage() method.

##############################

virtual void onMessage( const cms::Message* message ) throw() {

if(message->getCMSType() == "Advisory")

{

const ActiveMQMessage* amqMessage = dynamic_cast< const ActiveMQMessage*
>( message );

      if(amqMessage != NULL && amqMessage->getDataStructure() != NULL)

      {

            std::cout << "Connection Info : " <<
amqMessage->isConnectionInfo() <<std::endl; 

            std::cout << "Remove Info : " << amqMessage->isRemoveInfo()
<<std::endl; 

            std::cout << "Data Structure  -- " <<
amqMessage->getDataStructure()->toString() <<std::endl; 

       }

}

}           

######################

 

Here both isConnectionInfo() and isRemoveInfo() methods are returning as
"0" irrespective of messages received (even for Connection or Remove
messages). Data Structure is displayed properly as "ConnectionInfo" or
"RemoveInfo".

 

Could you please let me know if there is any change required in my
implementation to get correct values for these methods.

 

Note: I tried this with ActiveMQ-CPP 3.4.0.

 

Thanks & Regards

Suneel

 

Reply via email to