Hi, I'm following
http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html
this to implement request-response. So far so good. I'm trying to find when
a response cannot be delivered to the temporary queue (e.g. the producer
disconnects), so I can deliver the response to another queue. I tried the
following:
....
//Send the response to the Destination specified by the
JMSReplyTo field
of the received message,
//this is presumably a temporary queue created by the
client
this.replyProducer.send(message.getJMSReplyTo(),
response);
} catch (InvalidDestinationException i) {
try {
TextMessage response =
this.session.createTextMessage();
response.setText("this is the response to this request:
" +
messageText);
Destination clientQueue =
session.createQueue(message.getStringProperty("ServiceQueue"));
this.replyProducer.send(clientQueue, response);
} catch (Exception e) {
e.printStackTrace();
}
} catch (Exception e) {
...
And works fine in Java, but in the C++ client, the same code (I believe...)
doesn't throw anything:
...
this->replyProducer->send(message->getCMSReplyTo(),
response);
} catch (InvalidDestinationException& e) {
try {
TextMessage* response =
this->session->createTextMessage();
response->setText("this is the response to this
request: " +
messageText);
Destination* clientQueue =
session->createQueue(message->getStringProperty("ServiceQueue"));
this->replyProducer->send(clientQueue,
response);
} catch (CMSException e) {
e.printStackTrace();
}
} catch (CMSException& e) {
...
So, I cannot find when the temp queue is valid (or the producer is
connected...). Any clues or ideas ? I can try a different approach if
someone suggest me how to implement "redundant" request - response.
--
View this message in context:
http://www.nabble.com/InvalidDestinationException-not-throw-in-C%2B%2B-connector-tp25046837p25046837.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.