WSO2 ESB无法调用ActiveMQ

时间:2018-07-12 11:46:13

标签: java wso2 jms activemq esb

我对WSO2 ESB相当陌生。现在,我必须在不使用WSO2消息代理的情况下将消息发送到activemq队列。

此刻,我将所有需要的jar添加到CARBON_HOME / lib中,并使用defauts启动了activemq并编辑了axis2.xml以启用jms transportSender

我的顺序如下:

<inSequence>
      <log description="Log" level="full"/>
        <call>
            <endpoint>
                <address uri="jms:/QueueName?transport.jms.DestinationType=queue&amp;transport.jms.ContentTypeProperty=Content-Type&amp;java.naming.provider.url=tcp://localhost:61616&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;transport.jms.ConnectionFactoryType=queue&amp;transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory"/>
            </endpoint>
        </call>
    </inSequence
  

[2018-07-12 14:32:36,650] [] INFO-TimeoutHandler此引擎将在GLOBAL_TIMEOUT之后120秒内使所有回调失效,无论超时操作如何,在指定的或可选的超时之后     [2018-07-12 14:33:07,253] []错误-JMSSender在30000毫秒内未收到对目标的JMS响应:使用JMS的temp-queue:// ID:NumbedPC-60591-1531395156918-1:1:1相关ID:ID:NumbedPC-60591-1531395156918-1:1:1:1:1     [2018-07-12 14:33:07,268] []错误-发送消息时发生Axis2Sender意外错误     org.apache.axis2.AxisFault:在30000毫秒内未收到对目的地的JMS响应:temp-queue:// ID:NumbedPC-60591-1531395156918-1:1:1,JMS相关ID:ID:NumbedPC-60591- 1531395156918-1:1:1:1:1     在org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:231)     在org.apache.axis2.transport.jms.JMSSender.waitForResponseAndProcess(JMSSender.java:405)     在org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:343)     在org.apache.axis2.transport.jms.JMSSender.sendMessage(JMSSender.java:200)     在org.apache.axis2.transport.base.AbstractTransportSender.invoke(AbstractTransportSender.java:112)     在org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)     在org.apache.synapse.core.axis2.DynamicAxisOperation $ DynamicOperationClient.send(DynamicAxisOperation.java:185)处     在org.apache.synapse.core.axis2.DynamicAxisOperation $ DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167)处     在org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)     在org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:595)     在org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83)     在org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548)     在org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382)     在org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65)     在org.apache.synapse.mediators.builtin.CallMediator.handleNonBlockingCall(CallMediator.java:246)     在org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:115)     在org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)     在org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59)     在org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158)     在org.apache.synapse.rest.Resource.process(Resource.java:343)     在org.apache.synapse.rest.API.process(API.java:399)     在org.apache.synapse.rest.RESTRequestHandler.apiProcess(RESTRequestHandler.java:123)     在org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:101)     在org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69)     在org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:304)     在org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:78)     在org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)     在org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:326)     在org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:372)     在org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)     在org.apache.axis2.transport.base.threads.NativeWorkerPool $ 1.run(NativeWorkerPool.java:172)     在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)     在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)     在java.lang.Thread.run(Thread.java:748)     [2018-07-12 14:33:07,289] []警告-EndpointContext端点:地址为jms:/ QueueName?transport.jms.DestinationType = queue&transport.jms.ContentTypeProperty = Content-Type&java.naming.provider.url = tcp的AnonymousEndpoint :// localhost:61616&java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextContext&transport.jms.ConnectionFactoryType = queue&transport.jms.ConnectionFactoryJNDIName = QueueConnectionFactory将被标记为已暂停,因为它失败了     [2018-07-12 14:33:07,290] []警告-EndpointContext挂起终结点:地址为jms:/ QueueName?transport.jms.DestinationType = queue&transport.jms.ContentTypeProperty = Content-Type&java.naming.provider.url =的AnonymousEndpoint tcp:// localhost:61616&java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextContext&transport.jms.ConnectionFactoryType = queue&transport.jms.ConnectionFactoryJNDIName = QueueConnectionFactory-当前挂起持续时间为:30000ms-之后的下一次重试:7月12日星期四14:33:37 MSK 2018

有人可以告诉我我在做什么错吗?

1 个答案:

答案 0 :(得分:1)

您的设置假设发送JMS消息后,您最多将在30秒内收到JMS响应。因此,您的设置不是以“即发即弃”样式发送JMS消息,而是期望从另一端返回具有相同相关ID的响应。您可以清楚地看到here, in line 368

检查如何配置<inSequence> <call>使其不阻塞等待响应(如果需要)。否则,如果起火忘记将<inSequence>设置为OUT_ONLY

您可以关注this example here