JMS message - associate with Queue
Having a jms message, which method I can use to get the queue from which it came?
I think it should be something like:
message.getStri开发者_JAVA技巧ngProperty("OriginatingQueue")
You can call Message.getJMSDestination(). It will return a javax.jms.Destination which has no methods but will cast into a javax.jms.[Temporary]Topic or a javax.jms.[Temporary]Queue which in turn have getQueueName and getTopicName methods respectively. (Calling toString will usually render something useful, but that's implementation specific.)
精彩评论