<?xml version="1.0" encoding="UTF-8"?>
<standard-router>
	<!-- BEGIN standard-router -->
    <when>
        <simple>${headers.ENTAXY_Destination} == 'nsi'
            &amp;&amp; ${headers.ENTAXY_DestinationType} == null
        </simple>
        <setHeader name="NTX_NSI_Answer">
            <simple>true</simple>
        </setHeader>
        <to uri="entaxy-broker:queue:entaxy.nsi.entry.point?exchangePattern=InOnly"/>
    </when>

    <choice>
        <when>
            <simple>${headers.ENTAXY_DestinationType} == 'system.name'</simple>
            <toD uri="system:${headers.ENTAXY_Destination}"/>
        </when>
        <when>
            <simple>${headers.ENTAXY_DestinationType} == 'system-group.name'</simple>
            <toD uri="system-group:${headers.ENTAXY_Destination}"/>
        </when>
        <when>
            <simple>${headers.ENTAXY_DestinationType} == 'queue.name'</simple>
            <toD uri="entaxy-broker:queue:${headers.ENTAXY_Destination}"/>
        </when>
        <when>
            <simple>${headers.ENTAXY_DestinationType} == 'topic.name'</simple>
            <toD uri="entaxy-broker:topic:${headers.ENTAXY_Destination}"/>
        </when>
        <otherwise>
            <toD uri="system:${headers.ENTAXY_Destination}"/>
        </otherwise>
    </choice>
	<!-- END standard-router -->
</standard-router>
