开发者

JMS message - associate with Queue

开发者 https://www.devze.com 2023-03-19 00:55 出处:网络
Having a jms message, which method I can use to get the queue from which it came? I think it should be something like:

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.)

0

精彩评论

暂无评论...
验证码 换一张
取 消