activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Suneel Papineni <Suneel.Papin...@mettoni.com>
Subject Advisory Messages - isConnectionInfo() and isRemoveInfo() methods
Date Tue, 03 May 2011 17:10:59 GMT
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

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message