On Fri, 2009-08-28 at 06:53 -0700, moonbird wrote: > Hi, > > i have a c++ "CMS" Consument implemented with ActiveMQ-CPP library. > This Consument listens on a ActiveMQ queue. > I also have a ActiveMQ Java JMS Client as a "JMS" Producer which sends data > to the queue. > > My c++ Consument successfully receives the text messages from the queue > (XML-Text). > > Now I like to send back the modified text message to the Java producer > (QueueRequestor object) > > I use a c++ call in the consument for getting the producer adress (from the > Apache ActiveMQ examples): > destination = const_cast<Destination*>(msg->getCMSReplyTo()); > > I send back my new textmessage to this destination - but the java client > doesnt receive anything :-( > > Could it be, that msg->getCMSReplyTo() doesnt work with received JMS > Textmessages ? > If I use Apaches c++ example producer - it works :-/ > If this would be true - how could I send back data to the java producer ? > > Thx so far
The request / response pattern should work fine between Java and C++ clients. Could you post the source of you sample C++ and Java apps? Just a word of advice, you should be calling the clone methods on the destination returned from getCMSReplyTo() as the pointer being returned is owned by the Message and if you deleted that message the Desination instance returned would not be valid any longer. cms::Destination* destination = msg->getCMSReplyTo()->clone(); What you are doing may be okay, not sure since I can't see it in context of the rest of the code, but thought I would point out a potential issue you might run into. Regards Tim. -- Tim Bish http://fusesource.com http://timbish.blogspot.com/
