Reputation: 2626
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.getStringProperty("OriginatingQueue")
Upvotes: 0
Views: 139
Reputation: 16056
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.)
Upvotes: 1