Hello I'm trying to implement Request-Response pattern with: - ActiveMQ broker, - NMS (C#) on the client (requestor) side, - CMS (ActiveMQ-CPP) on the server (responder) side.
This pattern is described very clearly - for JMS: http://remark.wordpress.com/articles/implementing-request-response-with-activemq-and-nms/ - for NMS: http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html So, on the ActiveMQ-CPP side I perform the following steps: 1) create consumer that receives request from normal (permanent) queue, 2) obtain ReplyTo from the request using method getCMSReplyTo() of cms::Message, 3) dynamic_cast from cms::Destination* to cms::TemporaryQueue*, 4) retrieve name of the temporary queue using method getQueueName() of cms::TemporaryQueue (cms::Destination doesn't have this method), 5) store name of the temporary queue in std::string, 6) when a reply is ready, I need to send it to the temporary queue specified by client in ReplyTo of the request. The problem is that I don't understand how to send a message to a temporary queue by its name. For normal queues, I resolve a destination by its name using method resolveDestinationName() of activemq::cmsutil::DynamicDestinationResolver. However, it seems like DynamicDestinationResolver has nothing to do with temporary queues. Should I cast cmd::TemporaryQueue to activemq::commands::ActiveMQTempQueue, clone it using cloneDataStructure() and store a pointer to this object instead of storing std::string with a name of the temporary queue? P.S. I tried hard to find answer on this question in this mailing list, in ActiveMQ-CPP examples and docs, but I failed. Best regards, Ivan -- View this message in context: http://www.nabble.com/ActiveMQ-CPP%3A-how-to-send-to-temp-queue--tp24516906p24516906.html Sent from the ActiveMQ - User mailing list archive at Nabble.com.