JbossESB jmsProvider 无法转换 IBMMQ JMS 消息 JMSTextMessage

发布于 2024-09-04 04:37:23 字数 4882 浏览 3 评论 0原文

我正在尝试将 IBMMQ v6.0.2 与 jbossESB 集成。
我们在 QA QUEUEMANAGER 之一上的 IBMMQ 上提供了本地队列。 我能够使用 jboss ESB 的 JMSprovider 监听 QUEUE。一旦一条消息(类型为 jms_text )被丢弃,esb 就会监听它并拾取它,在它执行下一个操作之前,它会抛出以下错误消息。

错误 [JmsComposer] 不支持的 JMS 消息类型:com.ibm.jms.JMSTextMessage

以下是我遵循的步骤。

  1. jboss-service.mxl :定义的连接工厂和队列
  2. 将 jar ( com.ibm.mq.* ) 添加到 ${jbossesb}/server/${mynode}/lib
  3. 在 jboss-esb.xml 上添加了 jms lsinterner 配置

请指导我在这里缺少什么...我需要创建自定义 MessagePlugin 吗?

jboss-esb 看起来像这样

<jms-provider name="WSMQ" connection-factory="MQQueueConnectionFactory"> 
     <jms-bus busid="queuestartGwChannel"> <jms-message-filter
                   dest-type="QUEUE"
                   dest-name="wsmq/SerivceOrderQueue"
                   acknowledge-mode ="AUTO_ACKNOWLEDGE"
                />
     </jms-bus>
     <jms-bus busid="queuestartEsbChannel">
               <jms-message-filter
                   dest-type="QUEUE"
                   dest-name="wsmq/SerivceOrderQueue"
               />
     </jms-bus>
  </jms-provider>

jboss-service.xml 看起来像这样

   <mbean code="jmx.service.wsmq.WSMQConnectionFactory"
     name="jmx.service.wsmq:service=MQQueueConnectionFactory">
    <attribute name="JndiName">MQQueueConnectionFactory</attribute>
    <attribute name="JMSStyle">Queue</attribute>
    <attribute name="IsXA">false</attribute>
    <attribute name="QueueManagerName">SQAT0083</attribute>
    <attribute name="HostName">111.111.111.111</attribute>
    <attribute name="Port">1415</attribute>
    <attribute name="Channel">MYCO.SVRCONN</attribute>
    <attribute name="TransportType">CLIENT</attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>
  <mbean code="jmx.service.wsmq.WSMQDestination"
     name="jmx.service.wsmq:service=WSMQRequestQueue">
     <attribute name="JndiName">wsmq/SerivceOrderQueue</attribute>
     <attribute name="JMSStyle">Queue</attribute>
     <attribute name="QueueManagerName">SQAT0083</attribute>
     <attribute name="DestinationName">MYCO.SERVICEORDER.QA01.QL01</attribute>
     <attribute name="TargetClient">MQ</attribute>
     <depends>jboss:service=Naming</depends>
   </mbean>

我正在使用 jboss-eap-4.3。非常感谢任何帮助。

这是我的服务标签,看起来像在 jboss-esb.xml 中

        <listeners>


            <jms-listener name="MQ-Gateway"
                 busidref="queuestartGwChannel"
                 is-gateway="true"  maxThreads="1"
             />

            <jms-listener name="MQ-EsbListener"     busidref="queuestartEsbChannel"             />
        </listeners>

        <actions mep="OneWay">
            <action name="serviceOrderMarshaller"
                class="com.my.esb.actions.ServiceOrderMessageUnMarshallerAction"
                process="unmarshalPayload">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>
            <action name="serviceOrderStaging"
                class="com.my.esb.actions.ServiceOrdersStagingAction"
                process="stageServiceOrders">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="marginAndLeadTimeRetriever"
                class="com.my.esb.actions.MarginAndLeadTimeRetrieverAction"
                process="retrieveJobCodeInfo">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="createDraftRequestMapper"
                class="com.my.esb.actions.CreateDraftRequestMapperAction"
                process="mapData">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="omsCreateDraftRequestTranslator"
                class="com.my.esb.actions.OMSCreateDraftRequestTranslatorAction"
                process="translateData">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="createDraftRequestProcessor"
                class="com.my.esb.actions.CreateDraftRequestProcessorAction"
                process="dispatchRequest">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

</actions>

I am trying to integrate IBMMQ v6.0.2 with jbossESB.
we have local Queue available on IBMMQ on one of our QA QUEUEMANAGER.
I am able to listen to the QUEUE using JMSprovider of jboss ESB. As soon as a message (of type jms_text ) is dropped , esb listen to it and pick it up and before it hit the next action it throws following error message.

ERROR [JmsComposer] Unsupported JMS message type: com.ibm.jms.JMSTextMessage

Here are the steps I followed.

  1. jboss-service.mxl : Defined Connection Factory and QUEUE
  2. added jars ( com.ibm.mq.* ) to ${jbossesb}/server/${mynode}/lib
  3. Added jms lsinterner configuration on jboss-esb.xml

Please guide me what I m missing here... Do I need to create custom MessagePlugin ?

jboss-esb looks like this

<jms-provider name="WSMQ" connection-factory="MQQueueConnectionFactory"> 
     <jms-bus busid="queuestartGwChannel"> <jms-message-filter
                   dest-type="QUEUE"
                   dest-name="wsmq/SerivceOrderQueue"
                   acknowledge-mode ="AUTO_ACKNOWLEDGE"
                />
     </jms-bus>
     <jms-bus busid="queuestartEsbChannel">
               <jms-message-filter
                   dest-type="QUEUE"
                   dest-name="wsmq/SerivceOrderQueue"
               />
     </jms-bus>
  </jms-provider>

jboss-service.xml looks like this

   <mbean code="jmx.service.wsmq.WSMQConnectionFactory"
     name="jmx.service.wsmq:service=MQQueueConnectionFactory">
    <attribute name="JndiName">MQQueueConnectionFactory</attribute>
    <attribute name="JMSStyle">Queue</attribute>
    <attribute name="IsXA">false</attribute>
    <attribute name="QueueManagerName">SQAT0083</attribute>
    <attribute name="HostName">111.111.111.111</attribute>
    <attribute name="Port">1415</attribute>
    <attribute name="Channel">MYCO.SVRCONN</attribute>
    <attribute name="TransportType">CLIENT</attribute>
    <depends>jboss:service=Naming</depends>
  </mbean>
  <mbean code="jmx.service.wsmq.WSMQDestination"
     name="jmx.service.wsmq:service=WSMQRequestQueue">
     <attribute name="JndiName">wsmq/SerivceOrderQueue</attribute>
     <attribute name="JMSStyle">Queue</attribute>
     <attribute name="QueueManagerName">SQAT0083</attribute>
     <attribute name="DestinationName">MYCO.SERVICEORDER.QA01.QL01</attribute>
     <attribute name="TargetClient">MQ</attribute>
     <depends>jboss:service=Naming</depends>
   </mbean>

I am using jboss-eap-4.3. Really appreciate any help.

Here is my Service Tag Looks like in jboss-esb.xml

        <listeners>


            <jms-listener name="MQ-Gateway"
                 busidref="queuestartGwChannel"
                 is-gateway="true"  maxThreads="1"
             />

            <jms-listener name="MQ-EsbListener"     busidref="queuestartEsbChannel"             />
        </listeners>

        <actions mep="OneWay">
            <action name="serviceOrderMarshaller"
                class="com.my.esb.actions.ServiceOrderMessageUnMarshallerAction"
                process="unmarshalPayload">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>
            <action name="serviceOrderStaging"
                class="com.my.esb.actions.ServiceOrdersStagingAction"
                process="stageServiceOrders">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="marginAndLeadTimeRetriever"
                class="com.my.esb.actions.MarginAndLeadTimeRetrieverAction"
                process="retrieveJobCodeInfo">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="createDraftRequestMapper"
                class="com.my.esb.actions.CreateDraftRequestMapperAction"
                process="mapData">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="omsCreateDraftRequestTranslator"
                class="com.my.esb.actions.OMSCreateDraftRequestTranslatorAction"
                process="translateData">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

            <action name="createDraftRequestProcessor"
                class="com.my.esb.actions.CreateDraftRequestProcessorAction"
                process="dispatchRequest">
                <property name="springContextXml" value="spring/mainApplicationContext.xml"/>
            </action>

</actions>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

殤城〤 2024-09-11 04:37:23

响应有点晚,但如果有人读到此内容,答案是:

queuestartEsbChannel 正在侦听传递 jmstextmessages 的同一个队列,并且它的 is-gateway 设置为 false (默认值)。

如果 is-gatewayfalse,则该侦听器上只能接收 ESB 消息。

Bit late response but if someone reads this, the answer is:

queuestartEsbChannel is listening to the same queue that is delivering jmstextmessages and it has is-gateway set to false (default value).

If is-gateway is false, only ESB messages can be recieved on that listener.

反话 2024-09-11 04:37:23

我希望在 JMS 应用程序的 CLASSPATH 中看到 com.ibm.mqjms.jar,而不是 com.ibm.mq.*。

根据您使用的 WMQ 版本,请参考信息中心中的环境变量页面。 WMQ V6 页面 是这里(参见表 #2),以及 WMQ v7 页面 在这里(请参阅下面的表格注释)。请注意,各个版本之间的类已重新打包,并且 CLASSPATH 要求也有很大不同。

在 UNIX 版本上,您可以运行 setmqjms 脚本来配置 WMQ JMS 的环境。它位于 AIX 上的 /opt/mqm/java/bin 或 /usr/mqm/java/bin 中。不过,这假定安装了标准的 WMQ 客户端。如果你只是抓住罐子并重新放置它们,那是行不通的。特别是,如果您只是获取 com.ibm.mq* jar,它可能无法工作。您可以通过运行客户端安装附带的初始验证测试 (IVT) 来验证您的安装。使用完整 WMQ 客户端的额外好处是安装了所有跟踪实用程序、示例代码和其他诊断程序。

另一条建议是,即使 WMQ 服务器是 v6,也请务必使用 WMQ v7 客户端。这是因为 WMQ v6 将于明年停止服务,之后将不再受支持。现在使用 v7 客户端将为您节省以后的迁移、CLASSPATH 更改等。此外,当与 v7 QMgr 一起使用时,v7 类具有许多很酷的新功能,例如自动客户端重新连接到相同或不同的 QMgr,具体取决于您的配置。 WMQ 客户端安装可免费下载(需要注册),名称为 SupportPac MQC7

I would have expected to see com.ibm.mqjms.jar in the CLASSPATH for a JMS app, not com.ibm.mq.*.

Depending on the version of WMQ you are using, please reference the Environment Variables page in the Infocenter. WMQ V6 page is here (see Table #2), and the WMQ v7 page is here (see the table and the notes below). Note that the classes have been repackaged between versions and the CLASSPATH requirements are quite different.

On UNIX flavors, you can run the setmqjms script to configure the environment for WMQ JMS. It lives in /opt/mqm/java/bin or /usr/mqm/java/bin on AIX. This assumes a standard WMQ client installation, though. If you just grabbed the jars and relocated them, it won't work. In particular, if you just grabbed the com.ibm.mq* jars it likely won't work. You can verify your installation by running the Initial Verification Test (IVT) supplied with the client install. The additional benefit of using a full WMQ client is that all of the trace utilities and sample code and other diagnostics are installed.

One other piece of advice, be sure to use the WMQ v7 client even if the WMQ server is at v6. This is because WMQ v6 is going out of service next year and will not be supported after that. Using the v7 client now will save you a migration later, CLASSPATH changes, etc. In addition, the v7 classes have lots of cool new features when used with a v7 QMgr such as automatic client reconnection to the same or different QMgr, depending on your configuration. The WMQ client install is a free download (registration required) as SupportPac MQC7.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文