activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edison Melo <>
Subject InvalidDestinationException not throw in C++ connector
Date Wed, 19 Aug 2009 15:53:44 GMT

Hi, I'm following
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
			//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: " +
	            Destination clientQueue =
				this.replyProducer.send(clientQueue, response);
			} catch (Exception e) {
		} 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: " +
	            Destination* clientQueue =
				this->replyProducer->send(clientQueue, response);
			} catch (CMSException e) {
        } 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:
Sent from the ActiveMQ - User mailing list archive at

View raw message