3
votes

I have managed to send messages to a local message broker queue from wso2 esb.

However I am having trouble sending message to a remote queue. I thought if I included the server in the physical queue name in JNDI.properties this would work but it does not.

Anyone have any suggestion what config is to send messages to a remote message broker queue from ESB?

Cheers Macca

Bit more information

Error I get is :- ERROR - AMQConnection Throwable Received but no listener set: org.wso2.andes.client.AMQNoRouteException: Error: No Route for message [error code 312: no route]

Files I am using:-

jndi.properties

connectionfactory.ConnectionFactory = amqp://admin:admin@clientID/carbon?brokerlist='tcp://localhost:5673'

queue.myRemoteQueue = \\ServerName\myQueue

axis2.xml

<transportSender name="jms" class="org.apache.axis2.transport.jms.JMSSender"> 
        <parameter name="default" locked="false"> 
            <parameter name="java.naming.factory.initial"   locked="false">org.wso2.andes.jndi.PropertiesFileInitialContextFactory</parameter> 
            <parameter name="java.naming.provider.url" locked="false">repository/conf/jndi.properties</parameter> 
            <parameter name="transport.jms.ConnectionFactoryJNDIName" locked="false">ConnectionFactory</parameter> 
        </parameter> 
</transportSender>

ESB Proxy Service

<?xml version="1.0" encoding="UTF-8"?>
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="Test2JMS"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <log level="custom">
            <property name="STATE" value="message is sent to queue"/>
         </log>
         <property name="OUT_ONLY" value="true"/>
         <property name="FORCE_SC_ACCEPTED" value="true" scope="axis2"/>
      </inSequence>
      <outSequence/>
      <endpoint>
         <address uri="jms:/myRemoteQueue?&amp;transport.jms.DestinationType=queue"/>
      </endpoint>
   </target>
   <description/>
</proxy>
1
Do you have any code to share? What have you tried?superphonic
First post, so trying to get used to formatting. :-)macca18

1 Answers

0
votes

You are missing some information in your JMS address. Please refer https://docs.wso2.com/display/ESB481/ESB+as+a+JMS+Producer for the proper format.