在将消息发布到目标队列时,WSO2 EI-6.1.1与IBM MQ8集成问题

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在将消息发布到目标队列时,WSO2 EI-6.1.1与IBM MQ8集成问题相关的知识,希望对你有一定的参考价值。

TID: [-1] [] [2017-08-09 12:07:00,546]  INFO {org.apache.axis2.engine.AxisEngine} -  [MessageContext: logID=4cc6574b7acd53b2510b0e78661a4db2bff0d346d5081397] null {org.apache.axis2.engine.AxisEngine}
TID: [-1] [] [2017-08-09 12:07:00,546] ERROR {org.apache.synapse.core.axis2.AsyncCallback} -   {org.apache.synapse.core.axis2.AsyncCallback}
java.lang.NullPointerException
        at org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:224)
        at org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:200)
        at org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)
        at org.apache.axis2.engine.AxisEngine$TransportNonBlockingInvocationWorker.run(AxisEngine.java:626)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
TID: [-1] [] [2017-08-09 12:07:00,546]  WARN {org.apache.synapse.core.axis2.AsyncCallback} -  Executing fault handler due to exception encountered {org.apache.synapse.core.axis2.AsyncCallback}

点击这个链接“http://nandikajayawardana.blogspot.in/2015/03/configuring-ibm-mq-with-wso2-esb.html

注意:能够从队列接收消息但无法发送到队列,从而产生空指针异常

答案

在发送调解器开始工作之前添加了以下属性

<property name="OUT_ONLY" value="true"/>
            <property name="FORCE_SC_ACCEPTED" scope="axis2" value="true"/>
            <property name="JMS_IBM_PutApplType" scope="transport" type="INTEGER" value="2"/>
            <property name="JMS_IBM_Encoding" scope="transport" type="INTEGER" value="785"/>
            <property name="JMS_IBM_Character_Set" scope="transport" type="INTEGER" value="37"/>
            <property name="JMS_IBM_MsgType" scope="transport" type="INTEGER" value="8"/>
            <property action="remove" name="Accept-Encoding" scope="transport"/>
            <property action="remove" name="Content-Length" scope="transport"/>
            <property action="remove" name="User-Agent" scope="transport"/>
            <property action="remove" name="JMS_REDELIVERED" scope="transport"/>
            <property action="remove" name="JMS_DESTINATION" scope="transport"/>
            <property action="remove" name="JMS_TYPE" scope="transport"/>
            <property action="remove" name="JMS_REPLY_TO" scope="transport"/>
            <property action="remove" name="Content-Type" scope="transport"/>
            <send>
                <endpoint key="gov:endpoint"/>
            </send>
另一答案

问题是因为传输标头。在端点之前添加以下属性就足够了:

<property action="remove" name="TRANSPORT_HEADERS" scope="axis2"/>

以上是关于在将消息发布到目标队列时,WSO2 EI-6.1.1与IBM MQ8集成问题的主要内容,如果未能解决你的问题,请参考以下文章

php+redis实现消息队列

php+redis实现消息队列

mysql之消息队列

WSO2 ESB 5.0.0 配置 JMS 传输(ActiveMQ)- 队列消息生产与消费

WSO2 ESB 5.0.0 配置 JMS 传输(ActiveMQ)- 队列消息生产与消费

WSO2 ESB 5.0.0 配置 JMS 传输(ActiveMQ)- 队列消息生产与消费