Hello All.
I need to examine full URL which is requested from synapse, but unfortunately get-property('To') returns only path "/te/processes/ViewUser". My task is the following: start two HTTP servers on the same synapse service, and then route some messages from one port, and other messages from another port. It is achieved with following configuration:
axis2.xml:
<transportReceiver name="http" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
       <parameter name="port">8084</parameter>
       <parameter name="non-blocking">true</parameter>
   </transportReceiver>
<transportReceiver name="http-internal" class="org.apache.synapse.transport.nhttp.HttpCoreNIOListener">
       <parameter name="port">8280</parameter>
       <parameter name="non-blocking">true</parameter>
   </transportReceiver>
synapse.xml:
<filter source="get-property('To')" regex="^http://[^:]+:8280/te/processes/loginService$";>
           <send>
               <endpoint>
                   <loadbalance>
...
...
<filter source="get-property('To')" regex="^http://[^:]+:8084/te/processes/taskUpdater$";>
           <send>
               <endpoint>
                   <loadbalance>
...
...
But as I said before this doesn't work, because get-property('To') doesn't return full address, but only path part. Is there a way to determine address, or maybe transport receiver name such as "http" or "http-internal"? Or all I can do is start 2 instances of synapse with 2 different configurations?

Regards,
Alexey Ousov.

Reply via email to