开发者

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

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜