JBoss JMS ReplyTo

B

bud.curtis

I'm not certain this is particular issue with JBoss, but I seem to be
having trouble responding to the Destination specified in the

Message.getJMSReplyTo()

I have a small test case where a message is sent on queue/D and there
is another listener class receiving the onMessage(). Inside the
onMessage I determine there is a not null Destination. I then modify
the received message and send on the reply to queue. The reply to
queue is set to queue/C by the original message sender code. Also, a
simple system out of the replyQueue indicates it is set to queue/C (It
displays as QUEUE.C in the replyQueue toString()). A small excerpt of
the onMessage is shown here:

Destination replyDestination = message.getJMSReplyTo();
if (replyDestination instanceof Queue) {
replyQueue = (Queue) replyDestination;
.....
TextMessage outboundMessage =
replySession.createTextMessage(replyMsg);
QueueSender senderx = replySession.createSender(replyQueue);
senderx.send(outboundMessage);
senderx.close();
}

The problem I'm experiencing is the message appears to be sent on the
received queue instead of the queue specified by the destination. The
onMessage receives all the messages it sends out (even though it is
just listening on queue/D), and the queue/C does not have any pending
messages.

My question is, what am I doing wrong? Why doesn't the above code send
the message on queue/C?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top