Hi,
i tried to implement a request/reply jms pattern.
For this test, I use a java client (activemq java jms libs) and a c++
server(also activemq cpp cms libs).

The Java Client uses a java
QueueRequestor(http://java.sun.com/javaee/5/docs/api/javax/jms/QueueRequestor.html):

queueRequestor = new QueueRequestor(queueSession, stationInfoQueue);
                        //sends the message and waits until respond is received
                        TextMessage answer = (TextMessage) 
queueRequestor.request(textMessage);
                        System.out.println("CLIENT: Response message received: 
");
                        System.out.println(answer.getText()); 

and on server side, I try to get the temporary queue destination information
back like this:

cms::Destination* replyToAddress = NULL; 

                        if( msg->getCMSReplyTo() != NULL ) 
                        { 
                                std::cout << "ok: getCMSReplyTo() is not NULL 
!!! " << std::endl;
                        replyToAddress = msg->getCMSReplyTo()->clone(); 
                        }
                        else
                        {
                                std::cout << "error: getCMSReplyTo() is NULL 
!!! " << std::endl;
                                exit(1);
                        }
            
            // Create a MessageProducer from the Session to the Topic or
Queue
            MessageProducer* producer = session->createProducer(
replyToAddress );
            producer->setDeliveryMode( DeliveryMode::NON_PERSISTENT );


... but I dont receive anything back on the java client side :-( What is
wrong with my implementation ?
Is it wrong to use the QueueRequestor ? Because I read about the pattern:
http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html
... and there, the temporary queue is build up manually and
setJMSReplyTo(tempQueue) is used on client side....

For your help, thx so far !

-- 
View this message in context: 
http://www.nabble.com/ActiveMQ-Request-Reply-Pattern---Temporary-Queues-tp25213825p25213825.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to