2013-03-09 89 views
2

我在Websphere Liberty Profile 8.5下一个测试版上安装了WL 5.0.5.1,JMS适配器正常工作。我可以发送带有自定义属性的短信。我无法改变其他属性,如优先。文档非常神秘,反编译对我来说是最后的选择。我将不胜感激示例如何更改关联ID,优先级和其他消息字段。在WL.Server.writeJMSMessage中设置JMS消息字段

WL.Server.writeJMSMessage({ 
    destination: "myQueue", 
    properties: { 
    MY_PROPERTY: "123", // becomes custom property 
    priority: 9,   // becomes custom property JMSPriority is unchanged 
    JMSPriority: 9,  // ignored, neither changes JMSPriority nor becomes custom property 
    }, 
    priority: 9, // ignored as docs do not allow params here 
    JMSPriority: 9, // ignored 
}); 

回答

1

展望JMS适配器的代码看起来这是一个错误,不管是什么,你提供的消息将使用默认优先级发送(4)。

目前,我没有看到设置优先级的解决方法。

我在内部打开了一个缺陷,它可能很快就会被修复,因为它相对容易修复,谢谢你帮助我们找到这个bug。

关于相关性,设置JMSCorrelationID应该工作。

+0

我使用了“JMSCorrelationId”和“correlationId”属性,前者被吞下(忽略,没有出现在自定义属性上)后者显示为自定义属性;传送的消息具有“空”作为相关ID。与标题字段“JMSExpiration”和自定义“过期”字段(设置为“new Date()。getTime()”)相同;第一个被忽略,第二个创建自定义属性。结论是**头字段根本不起作用**。 QA团队是否休假? :P – andy 2013-03-20 21:23:37