MQ标头-标识符上下文-ApplIdentityData [英] MQ header - Identifier context - ApplIdentityData

查看:93
本文介绍了MQ标头-标识符上下文-ApplIdentityData的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们想从MQ Header上的ApplIdentityData中提取信息.但是在消费者方面,我们没有看到ApplIdentityData的相应JMS标头.我确实在日志上进行了跟踪,但没有找到与ApplIdentityData相关的任何信息.

We want to extract information from ApplIdentityData on MQ Header. But on the consumer side, we dont see corresponding JMS header for ApplIdentityData. I did trace on the logs and i dont find any information related to ApplIdentityData.

我正在使用Apache Camel读取MQ并处理队列消息.在骆驼跟踪日志中,我找不到ApplIdentityData的任何内容.你能帮我吗?

I am using Apache Camel to read the MQ and process the Queue Message. In the camel trace logs, i dont find anything to ApplIdentityData. Could you please help me ?

下面是MQ消息标题和骆驼文件:

Below is the MQ Message Header and Camel File :

    StrucId  : 'MD  '  Version : 2
    Report   : 0  MsgType : 8
    Expiry   : -1  Feedback : 0
    Encoding : 273  CodedCharSetId : 819
    Format : 'MQSTR   '
    Priority : 0  Persistence : 1
    MsgId : X'414D51204445544C4437513120202020594010C12E08AD2B'
    CorrelId : X'000000000000000000000000000000000000000000000000'
    BackoutCount : 0
    ReplyToQ       : '                                                '
    ReplyToQMgr    : 'etlQ07                                        '
    ** Identity Context
    UserIdentifier : '            '
    AccountingToken : 
    X'0000000000000000000000000000000000000000000000000000000000000000'
    ApplIdentityData : 'TEST_HEADER_BADRI_DEC5'
    ** Origin Context
    PutApplType    : '6'
                '
    PutDate  : '20171205'    PutTime  : '08285663'
    ApplOriginData : '    '

    GroupId : X'414D51204445544C4437513120202020594010C12E08AD2C'
    MsgSeqNumber   : '1'
    Offset         : '0'
    MsgFlags       : '1'
    OriginalLength : '-1'

骆驼文件:

            <!-- Recs Prem Cash MQ Configuration START -->
        <camel:route id="rp-cash-mq-route">
                                <camel:setHeader headerName="CamelCharsetName"><camel:constant>UTF-8</camel:constant></camel:setHeader>
                            <camel:setHeader headerName="endpoint.error.folder"><camel:constant>file:///usr/local/clo/data/tlm/fuse/archive/failed</camel:constant></camel:setHeader>
                <camel:setHeader headerName="route.accessAreaId"><camel:simple resultType="Long">1</camel:simple></camel:setHeader>
                <camel:setHeader headerName="mi-endpoint"><camel:constant>st-csv-in</camel:constant></camel:setHeader>
                                <camel:setHeader headerName="CamelFileName"><camel:simple>${header.JMS_IBM_MQMD_ApplIdentityData}</camel:simple></camel:setHeader>
            <camel:to uri="direct:st-csv-in"/>
        </camel:route>
        <!-- Recs Prem Cash MQ Configuration END -->

推荐答案

看看这两个知识中心页面,这些页面将告诉您如何执行此操作:

Take a look at these two Knowledge Center pages which will tell you how to do it:

https ://www.ibm.com/support/knowledgecenter/zh-CN/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q032330_.htm

https ://www.ibm.com/support/knowledgecenter/zh-CN/SSFKSJ_9.0.0/com.ibm.mq.dev.doc/q032350_.htm

基本上,必须在接收消息之前,将属性"WMQ_MQMD_READ_ENABLED"设置为true来配置JMS目标.然后,您可以在收到的消息上查询属性"JMS_IBM_MQMD_ApplIdentityData".

Essentially you have to configure the JMS Destination with the property "WMQ_MQMD_READ_ENABLED" set to true before receiving the message. You can then query the property, "JMS_IBM_MQMD_ApplIdentityData" on the received message.

这篇关于MQ标头-标识符上下文-ApplIdentityData的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆