0

I have used mule 3.

In my flow I will need add choice by using queue name.

How can I get queue name from message in xml file?

Thanks!

4

1 に答える 1

3

実際の JMS キューまたはトピックは、 と呼ばれる JMS ヘッダーで使用できますJMSDestination。という名前のミュールから、名前付きメッセージ プロパティとしてこれを抽出できますJMSDestination

結果の XML は次のようになります (設定方法によって異なります)。

  <choice>
    <when expression="message.inboundProperties['JMSDestination'].endsWith('.A')">
      <!-- do something -->
    </when>
    <when expression="message.inboundProperties['JMSDestination'].endsWith('.B')">
      <! -- do something else -->
    </when>
    <otherwise>
      <! -- do the default -->
    </otherwise>
  </choice>
于 2012-07-31T21:46:47.083 に答える