在WL.Server.writejsmessage中设置JMS消息字段

在WL.Server.writejsmessage中设置JMS消息字段,jms,ibm-mobilefirst,Jms,Ibm Mobilefirst,我已经在WebSphereLibertyProfile8.5下一个测试版上安装了WL5.0.5.1,JMS适配器工作正常。我可以发送带有自定义属性的文本消息。我无法更改其他属性,如优先级。文档非常神秘,反编译是我最后的选择。我希望您能举例说明如何更改关联ID、优先级和其他消息字段 WL.Server.writeJMSMessage({ destination: "myQueue", properties: { MY_PROPERTY: "123", // becomes cus

我已经在WebSphereLibertyProfile8.5下一个测试版上安装了WL5.0.5.1,JMS适配器工作正常。我可以发送带有自定义属性的文本消息。我无法更改其他属性,如优先级。文档非常神秘,反编译是我最后的选择。我希望您能举例说明如何更改关联ID、优先级和其他消息字段

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
});

查看JMS适配器的代码,看起来这是一个bug,不管您提供什么,消息都将以默认优先级发送(4)

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

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

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

我使用了“JMSCorrelationID”和“correlationId”属性,前者被吞没(忽略,没有出现在自定义属性上),后者作为自定义属性出现;已传递消息的相关ID为“null”。与标头字段“JMSExpiration”和自定义“expiration”字段(设置为“new Date().getTime()”)相同;第一个被忽略,第二个创建自定义属性。结论是,标题字段根本不起作用。QA团队正在度假吗P