0
votes

I am fairly new to the WSO2 ESB. Now I have to send messages to activemq queue withouth use of WSO2 Message broker.

By this moment I added all jars that needed to CARBON_HOME/lib and started activemq with defauts as well as edited axis2.xml to enable jms transportSender

My in sequence looks like this:

<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 This engine will expire all callbacks after GLOBAL_TIMEOUT: 120 seconds, irrespective of the timeout action, after the specified or optional timeout [2018-07-12 14:33:07,253] [] ERROR - JMSSender Did not receive a JMS response within 30000 ms to destination : temp-queue://ID:NumbedPC-60591-1531395156918-1:1:1 with JMS correlation ID : ID:NumbedPC-60591-1531395156918-1:1:1:1:1 [2018-07-12 14:33:07,268] [] ERROR - Axis2Sender Unexpected error during sending message out org.apache.axis2.AxisFault: Did not receive a JMS response within 30000 ms to destination : temp-queue://ID:NumbedPC-60591-1531395156918-1:1:1 with JMS correlation ID : ID:NumbedPC-60591-1531395156918-1:1:1:1:1 at org.apache.axis2.transport.base.AbstractTransportSender.handleException(AbstractTransportSender.java:231) at org.apache.axis2.transport.jms.JMSSender.waitForResponseAndProcess(JMSSender.java:405) at org.apache.axis2.transport.jms.JMSSender.sendOverJMS(JMSSender.java:343) 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.send(AxisEngine.java:442) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:185) at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.executeImpl(DynamicAxisOperation.java:167) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149) at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:595) at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:83) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:548) at org.apache.synapse.endpoints.AbstractEndpoint.send(AbstractEndpoint.java:382) at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:65) at org.apache.synapse.mediators.builtin.CallMediator.handleNonBlockingCall(CallMediator.java:246) at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:115) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97) at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:59) at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:158) at org.apache.synapse.rest.Resource.process(Resource.java:343) at org.apache.synapse.rest.API.process(API.java:399) at org.apache.synapse.rest.RESTRequestHandler.apiProcess(RESTRequestHandler.java:123) at org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:101) at org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:69) at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:304) at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:78) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) at org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:326) at org.apache.synapse.transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:372) at org.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) 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) [2018-07-12 14:33:07,289] [] WARN - EndpointContext Endpoint : AnonymousEndpoint with address jms:/QueueName?transport.jms.DestinationType=queue&transport.jms.ContentTypeProperty=Content-Type&java.naming.provider.url=tcp://localhost:61616&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&transport.jms.ConnectionFactoryType=queue&transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory will be marked SUSPENDED as it failed [2018-07-12 14:33:07,290] [] WARN - EndpointContext Suspending endpoint : AnonymousEndpoint with address jms:/QueueName?transport.jms.DestinationType=queue&transport.jms.ContentTypeProperty=Content-Type&java.naming.provider.url=tcp://localhost:61616&java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&transport.jms.ConnectionFactoryType=queue&transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory - current suspend duration is : 30000ms - Next retry after : Thu Jul 12 14:33:37 MSK 2018

Can anyone tell me what am I doing wrong?

1
Not yet clear what is your problem exactly. Can you detail a bit? The stacktrace only shows that call mediator waits for response and finally times out.user3714601
My problem is that there is no message sent to activemq. I belive this is because there is some configurations that have to be done to esb in order to make it work. And I am a bit confused that it timeouts on some temp queue "temp-queue://ID:NumbedPC-60591-1531395156918-1:1:1" when I send message to queue with name "QueueName"Constantine
Is whoever consuming the message on the other side of the ActiveMQ queue actually consuming the message and sending the response? I believe the setup you have here is emulating an RPC call, so expecting some kind of response, which is never coming.jbx
Ok I managed to find out that messages actually was reaching destination queue. Actually exception was because i didnt apply a property: <property name="OUT_ONLY" scope="default" type="STRING" value="true"/> to state that this is one-way operation.Constantine

1 Answers

1
votes

Your setup is assuming that after you send the JMS message, you will get a JMS response back in at most 30 seconds. So your setup is not sending JMS messages in 'fire and forget' style, but expecting a response back from the other side with the same correlation ID. You can see this clearly here, in line 368.

Check how to configure the <inSequence> <call> not to be blocking waiting for a response (if you need it). Or if it is fire and forget set the <inSequence> to OUT_ONLY.

You can follow this example here.