简体   繁体   中英

Mule Amqp plugin and Mel

I want to post message to exchange with routing key. The message witch I want to send is from payload, but routing key I'm seting in message in inbound properties, and then I set: routingKey="#[message.inboundProperties.routingKey]" but it not working

<flow name="ExportToFk" doc:name="ExportToFk">
        <vm:inbound-endpoint exchange-pattern="one-way" path="rabbitSenderVM" doc:name="SendToRabbit"/>
        <scripting:component doc:name="Groovy">
            <scripting:script engine="Groovy"><![CDATA[import org.mule.api.transport.PropertyScope

def xml = payload.xml
def routingKey = payload.routing

println "XML: $xml"
println "ROUTINGKEY: $routingKey"

message.setProperty('routingKey', routingKey, PropertyScope.INBOUND)

return xml]]></scripting:script>
        </scripting:component>
        <amqp:outbound-endpoint exchangeName="${amqp.exchange}" routingKey="#[message.inboundProperties.routingKey]" responseTimeout="10000" connector-ref="AMQP_Connector" doc:name="AMQP"/>
    </flow>

这是一个已知问题,目前正在开发中: https : //github.com/mulesoft/mule-transport-amqp/issues/24

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM