You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

TIBCO BWCE发送MQ消息时MQMD ApplIdentityData字段未传递求助

问题:TIBCO BWCE 2.10 JMS Send 无法传递IBM MQ的ApplIdentityData字段

使用TIBCO BWCE Studio 2.10的JMS Send组件向IBM MQ发送消息,需要传递MQMD的ApplIdentityData字段给接收应用。消息能正常到达MQ,但该字段未被正确传递。当前JMS Send配置如下:

destination = "queue:///<MQQUEUE>?targetClient=1"

replyTo = <Reply.Q>

OtherProperties (non-DynamicProperties)
WMQ_MQMD_WRITE_ENABLED = true
JMS_IBM_MQMD_ApplIdentityData = "SampleValue"

同时附上JMS Send的XSLT代码:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tns="http://www.tibco.com/namespaces/tnt/plugins/jms+4779da9c-86d7-4bca-817b-eaac428edc1e+input" xmlns:ns="http://www.tibco.com/namespaces/tnt/plugins/jms+71351883-8751-4753-9a62-91ef666e1899+output" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bw="http://www.tibco.com/bw/xpath/bw-custom-functions" xmlns:tib="http://www.tibco.com/bw/xslt/custom-functions" version="2.0">
    <xsl:param name="ReceiveFromJMS"/>
    <xsl:param name="MQHeaderWriteEnabled"/>
    <xsl:template name="SendToMQ-input" match="/">
        <tns:ActivityInput>
            <destination>
                <xsl:value-of select="'queue:///SAMPLE.QUEUE?targetClient=1&amp;mdWriteEnabled=true&amp;mdMessageContext=1'"/>
            </destination>
            <replyTo>
                <xsl:value-of select="'SAMPLE.REPLYQUEUE'"/>
            </replyTo>
            <JMSProperties/>
            <Body>
                <xsl:value-of select="$ReceiveFromJMS/Body"/>
            </Body>
            <DynamicProperties/>
            <tns:OtherProperties>
                <WMQ_MQMD_WRITE_ENABLED>
                    <xsl:value-of select="$MQHeaderWriteEnabled"/>
                </WMQ_MQMD_WRITE_ENABLED>
                <WMQ_MQMD_MESSAGE_CONTEXT>
                    <xsl:value-of select="&quot;WMQ_MDCTX_SET_ALL_CONTEXT&quot;"/>
                </WMQ_MQMD_MESSAGE_CONTEXT>
                <JMS_IBM_MQMD_ApplIdentityData>
                    <xsl:value-of select="&quot;CNTR_PARTY&quot;"/>
                </JMS_IBM_MQMD_ApplIdentityData>
                <JMS_IBM_MQMD_ApplOriginData>
                    <xsl:value-of select="&quot;49&quot;"/>
                </JMS_IBM_MQMD_ApplOriginData>
                <JMS_IBM_MQMD_Format>
                    <xsl:value-of select="&quot;MQSTR&quot;"/>
                </JMS_IBM_MQMD_Format>
            </tns:OtherProperties>
        </tns:ActivityInput>
    </xsl:template>
</xsl:stylesheet>

排查与解决建议

  • 确认配置一致性:
    确保WMQ_MQMD_WRITE_ENABLED在静态配置和XSLT参数中都明确设为true,避免参数值被覆盖或未正确传递。destination URL中的mdWriteEnabled=true与该属性作用一致,需保持统一。
  • 检查属性拼写:
    IBM MQ的JMS扩展属性区分大小写,确认JMS_IBM_MQMD_ApplIdentityData拼写完全正确,无大小写或字符错误。
  • 改用DynamicProperties传递:
    将MQMD相关属性移到DynamicProperties节点下,部分版本的TIBCO BWCE中动态属性更能确保字段被正确映射。修改XSLT如下:
    <DynamicProperties>
        <property>
            <name>JMS_IBM_MQMD_ApplIdentityData</name>
            <value><xsl:value-of select="&quot;CNTR_PARTY&quot;"/></value>
        </property>
        <property>
            <name>JMS_IBM_MQMD_ApplOriginData</name>
            <value><xsl:value-of select="&quot;49&quot;"/></value>
        </property>
    </DynamicProperties>
    
    同时移除OtherProperties中的对应属性,保留WMQ_MQMD_WRITE_ENABLED和WMQ_MQMD_MESSAGE_CONTEXT配置。
  • 验证字段长度:
    IBM MQ的ApplIdentityData字段最大长度为32字符,检查设置的值是否超出限制,超出部分会被截断或导致字段不生效。
  • 检查版本兼容性:
    确认使用的IBM MQ客户端版本与TIBCO BWCE 2.10兼容,版本不匹配可能导致MQMD属性映射异常,建议使用TIBCO官方推荐的MQ客户端版本。

内容的提问来源于stack exchange,提问作者JMSMQ

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.11 18:13:08