activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From moonbird <>
Subject ActiveMQ Request/Reply Pattern - Temporary Queues
Date Sun, 30 Aug 2009 17:39:54 GMT

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 = 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: ");

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(); 
				std::cout << "error: getCMSReplyTo() is NULL !!! " << std::endl;
            // Create a MessageProducer from the Session to the Topic or
            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:
... 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:
Sent from the ActiveMQ - User mailing list archive at

View raw message