Ibm mq IBM MQ DLQ消息原因MQRC 3023

Ibm mq IBM MQ DLQ消息原因MQRC 3023,ibm-mq,Ibm Mq,我有一个java程序,使用javax.jms*类将消息发布到MQ主题(MQv7.5),很少有消息发送到DLQ,DLQ头中有以下详细信息: 格式“无格式” 原因‘3023’ ->3023 0x00000bcf MQRCCF\u MD\u格式错误 消息中的标题信息: DeadLetter Header Information Encoding 'Default Encoding' Character Set 'ibm1208' Format 'No Format' Reason '30

我有一个java程序,使用javax.jms*类将消息发布到MQ主题(MQv7.5),很少有消息发送到DLQ,DLQ头中有以下详细信息:

格式“无格式” 原因‘3023’ ->3023 0x00000bcf MQRCCF\u MD\u格式错误

消息中的标题信息:

DeadLetter Header Information Encoding 'Default Encoding' Character Set 'ibm1208' Format 'No Format' Reason '3023' Destination Queue Manager 'QMGRSTCRT1' Destination Queue ' ' Put Appl Name 'WebSphere MQ Client for Java' Put Appl Type 'Java' Date/Time '20150127-19271043' RFH Header Information Encoding 'Default Encoding' Character Set 'ibm1208' Flags '0' Format 'No Format' Name Value Pair 'UNIQUE_CONNECTION_ID', '414D512045414D51534331202020202054B921242739A302 MQPSCommand Publish MQPSTopic CUSTOMER_EVENT MQPSPubOpts NoReg ' MQMD Put Date 'Tue Jan 07 13:38:44 CST 2015' Message ID: '414D512045414D51534331202020202054B9212427896148' Correlation ID: '414D512045414D515343312020202020542907882CEF7E04' Group ID: '000000000000000000000000000000000000000000000000' Account Token: '0000000000000000000000000000000000000000000000000000000000000000' AppID Data: ' ' App Origin Data: ' ' Backout Count: '0' Character Set: 'ibm1208' Expiry: '14' Format: 'RFH version 1' Encoding: 'Default Encoding' Feedback: 'None' Message Flags: 'None' Offset: '0' Sequence Number: '1' Type: 'Datagram' Persistence: 'Not Persistent' Priority: '4' Put Appl Name: 'QMGRSTCRT1 ' Put Appl Type: '26' Reply To Queue Manager: 'QMGRSTCRT1 ' Reply To Queue Name: ' ' Report: 'Default Report Options, New Msg ID, Copy Msg ID to Correlation ID, Dead Letter Q' User ID: 'tempid ' Version: '2' Content Type: 'writestring' JMS properties JMSDeliveryMode 2 JMSDestination topic://CUSTOMER_EVENT JMSTimestamp 1422387524491 mcd.Msd jms_object JMSExpiration 1422391124491 受保护的void createTopicPub(字符串clientID,长msgLifeTime)引发JMSException{ closeTopicPub()

}

是什么导致MD格式错误?哪里需要更正?

此错误代码表示消息的MQMD格式字段的值不是
MQFMT_ADMIN

IBM MQ的各个部分都希望获得格式为MQFMT_ADMIN的消息:-

  • 命令服务器
  • 排队发布/订阅
从提供的AMQERR01.LOG错误消息中,我们可以看到问题的功能是排队的发布/订阅代理

由于您使用的是V7.5,因此不需要使用排队发布/订阅,您可以直接使用主题。您说您的应用程序是Java,但不说它是否是JMS。使用队列发布/订阅与直接使用主题是在JMS的掩护下进行的,因此您可能没有意识到您正在这样做。检查
PROVIDERVERSION
是否设置为7而不是6。

此错误代码表示消息的MQMD格式字段的值不是
MQFMT_ADMIN

IBM MQ的各个部分都希望获得格式为MQFMT_ADMIN的消息:-

  • 命令服务器
  • 排队发布/订阅
从提供的AMQERR01.LOG错误消息中,我们可以看到问题的功能是排队的发布/订阅代理


由于您使用的是V7.5,因此不需要使用排队发布/订阅,您可以直接使用主题。您说您的应用程序是Java,但不说它是否是JMS。使用队列发布/订阅与直接使用主题是在JMS的掩护下进行的,因此您可能没有意识到您正在这样做。检查
PROVIDERVERSION
是否设置为7而不是6。

是否在MQ v7.5中使用排队发布/订阅?MQ客户端的版本是什么?使用了MQ java类JAR v7.5。您是否在MQ v7.5中使用排队发布/订阅?MQ客户端的版本是什么?使用了MQ java类jars v7.5..您好,Morag,我们使用的是JMS,但没有使用PROVIDERVERSION属性。Ok。我们可能还需要一些线索。您是否可以用完整的消息内容更新问题?这是最终出现在DLQ上的消息吗?DLQ头在哪里?使用amqsbcg示例浏览就可以了。这很有趣,DLQ头显示此DLQ消息未被写入,因为命令服务器或发布/订阅引擎对消息的内容不满意,并且DLQ头中没有队列。它是由Java客户机编写的。我想知道@calanais是否能进一步提供帮助。我还添加了qmgr日志。。与此DLQ msgHi Morag相对应,我们使用的是JMS,而没有使用PROVIDERVERSION属性。Ok。我们可能还需要一些线索。您是否可以用完整的消息内容更新问题?这是最终出现在DLQ上的消息吗?DLQ头在哪里?使用amqsbcg示例浏览就可以了。这很有趣,DLQ头显示此DLQ消息未被写入,因为命令服务器或发布/订阅引擎对消息的内容不满意,并且DLQ头中没有队列。它是由Java客户机编写的。我想知道@calanais是否能进一步提供帮助。我还添加了qmgr日志。。对应于此DLQ msg AMQ5882: WebSphere MQ Publish/Subscribe broker has written a message to the dead-letter queue. EXPLANATION: The broker has written a message to the dead-letter queue (SYSTEM.DEADLETTER.QUEUE ) for reason '3023:MQRCCF_MD_FORMAT_ERROR'. Note. To save log space, after the first occurrence of this message for stream (TEST.PUBSUB ), it will only be written periodically. ACTION: If the message was not deliberately written to the dead-letter queue, for example by a message broker exit, determine why the message was written to the dead-letter queue, and resolve the problem that is preventing the message from being sent to its destination.
    private TopicConnection topicConnection = null;
private TopicSession topicSession = null;
private TopicPublisher topicPub = null ;
private TopicSubscriber topicSub = null ;
    if (topicSession == null)
        createTopicConnectionWithClientID(clientID);

    Topic the_topic = (Topic)topicSession.createTopic(topicName);
    topicPub = topicSession.createPub(the_topic);           
    topicPub.setDeliveryMode(DeliveryMode.PERSISTENT);
    topicPub.setPriority(4);
    //SET the time to expire the message
    topicPub.setTimeToLive(msgLife);        
    topicConnection.start();        
}
public void sendMessage(String msg) throws JMSException {
    TextMessage message = null ;
    if (topicPub == null) {
        throw new JMSException("TopicPub is null");
    }
    message = topicSession.createTextMessage(msg);
    topicPub.publish(message);              
    log.debug("Message sent");
private void createTopicConnWithClientID(String clientID) throws JMSException {
            closeTopicConnection(); 
        MQTopicConnectionFactory topicCF = new MQTopicConnectionFactory();
        topicCF.setHostName(hostName);
        topicCF.setPort(portNumber);
        topicCF.setQueueManager(queueManager);
        topicCF.setChannel(channel);
        topicCF.setTransportType(JMSC.MQJMS_TP_CLIENT_MQ_TCPIP);        
        // create connection and session
        topicConnection = topicCF.createTopicConnection();      
        topicConnection.setClientID(clientID);              
        topicSession = topicConnection.createTopicSession(transactional,Session.AUTO_ACKNOWLEDGE);
}