I have constructed a customized Consumer class with the following line
(declare onMessage(..) in Consumer.hpp. 

/virtual void onMessage(const Message* message);
/

I do not want to have "using namespace xxx" in header, so I need to identify
which Message object it passed to.  I found a "Message.h" in
~/activemq-cpp-library-3.8.4/src/main/cms, so I assume that it is, so I
added 'cms::' in above line, and thought it would solve the problem. 
However,  weird behavior happened, Instead of getting what the Producer has
just sent, the Consumer received something seems to be sent before.   I have
restarted the CMS broker, it did not solve the problem.   Did I use a wrong
namespace for Message ? 
 
 I checked the Message.h under 'cms' directory, it has 'CMS_API'  declared
in front of the Message class,

/class CMS_API Message {
/
What does the CMS_API do ? 

If I include all these following in header, then it works fine.

/using namespace activemq::core;
using namespace decaf::util::concurrent;
using namespace decaf::util;
using namespace decaf::lang;
using namespace cms;
/

Another question, in ActiveMQ-CPP example, there is an 'AMQCPP_UNUSED' pass
to the argument of the main() function.  What does it mean ?

Thanks.



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Is-Message-object-in-arugment-of-onMessage-under-the-cms-namespace-tp4701425.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to