Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9092423
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T22:50:31+00:00 2026-06-16T22:50:31+00:00

Is there a way to propagate MULE_CORRELATION_ID in a message that goes through different

  • 0

Is there a way to propagate MULE_CORRELATION_ID in a message that goes through different JMS queues. I tried OUTBOUND, SESSION scopes in <message-properties-transformer> element but doesn’t work. Same holds true for other custom properties as well.

As a workaround, I’m forced to add message property in intermediary flows.

It looks like outbound properties end up in the inbound scope for the receiving endpoint. Can we configure this behavior

Sample Mule flow:

<flow name="proxyService">
    <http:inbound-endpoint address="${xxx.service.address}"
        exchange-pattern="request-response">
        <cxf:proxy-service wsdlLocation="classpath:xxx.wsdl"
            namespace="http://xxxx.com/services/abc" service="ABCService" />
    </http:inbound-endpoint>

    <component class="com.xxxx.services.xxx.ABCServiceProxy" />
    <choice>
        <when evaluator="xpath" expression="fn:local-name(/*/*[1])='blah'">             
            <choice>                    
                <when evaluator="xpath"
                    expression="//acord:TXLifeRequest/acord:TransType/@tc='121'">                       
                    <!-- this is asynchronous communication using correlation id -->
                    <message-properties-transformer scope="outbound">
                        <add-message-property key="MULE_CORRELATION_ID"
                    value="#[xpath://abc:XYZRequest/some ID]" />
                    </message-properties-transformer> 
                     <request-reply > 
                        <jms:outbound-endpoint queue="order.queue">
                            <message-properties-transformer scope="outbound">                                   <delete-message-property key="MULE_REPLYTO" />                                  
                            </message-properties-transformer>
                        </jms:outbound-endpoint>
                         <jms:inbound-endpoint queue="status.queue" />
                    </request-reply>                        
                </when>
                <when evaluator="xpath"
                    <!-- other cases -->
                </when>
                <otherwise>
                    <!-- create failure response -->                        
                    <jms:outbound-endpoint queue="mviq.error.queue" />
                </otherwise>
            </choice>
        </when>
        <otherwise>
            <!-- log -->
        </otherwise>
    </choice>
</flow>

<flow name="ProcessOrder">
    <jms:inbound-endpoint queue="order.queue"
        exchange-pattern="one-way" />
    <!-- Storing the payload in another variable because xslt transformer will overwrite it -->
    <set-variable variableName="xxxPayload" value="#[message.payload]" />
    <xm:xslt-transformer xsl-file="xsl/something.xslt" />
    <choice>
        <when expression="'some string'">
            <!-- Overwriting the current payload to original payload -->                <set-payload value="#[xxxPayload]" />
            <logger level="INFO"
                message="payload before pushing to EMSI queue: #[payload]" />
            <jms:outbound-endpoint queue="order.special.queue" />
        </when>
        <when expression="string 2">
            <!-- other case -->
        </when>
        <when expression="'blah">

        </when>
        <otherwise>

            <jms:outbound-endpoint queue="error.queue" />
        </otherwise>
    </choice>
</flow>


<flow name="ProcessingSpecialQueue">
    <jms:inbound-endpoint queue="order.special.queue" />

    <message-properties-transformer doc:name="Message Properties">

        <add-message-property key="MULE_CORRELATION_ID" value="#some value" />
    </message-properties-transformer>

    .... more logic


</flow>

MULE_CORRELATION_ID was set before pusing message to order.queue. Now I again need to set it in order.special.queue. Now, if I needto push message into 3rd jms queue, again need to set it.

Is there a way that set correlation id just once and expect it to be not lost in subsequent queues.

I’m using Mule 3.3.0

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T22:50:32+00:00Added an answer on June 16, 2026 at 10:50 pm

    Is there a way to propagate MULE_CORRELATION_ID in a message that goes through different JMS queues.

    This should be done automatically for you: if it doesn’t happen, you may well be hitting a bug. Mule version? Sample configuration that allows reproducing the issue?

    It looks like outbound properties end up in the inbound scope for the receiving endpoint.

    This is a feature not a bug: no way to turn this off.

    EDIT I have been able to reproduce the problem with a trimmed down version of your configuration:

    <jms:activemq-connector name="jmsConnector"
        specification="1.1" />
    
    <flow name="proxyService">
        <http:inbound-endpoint address="http://localhost:8080/test" />
        <set-property propertyName="MULE_CORRELATION_ID" value="custom_cid" />
        <jms:outbound-endpoint queue="order.queue" />
    </flow>
    
    <flow name="ProcessOrder">
        <jms:inbound-endpoint queue="order.queue" />
        <logger message="--> ProcessOrder CID: #[message.correlationId]"
            level="INFO" />
        <jms:outbound-endpoint queue="order.special.queue" />
    </flow>
    
    
    <flow name="ProcessingSpecialQueue">
        <jms:inbound-endpoint queue="order.special.queue" />
        <logger message="--> ProcessingSpecialQueue CID: #[message.correlationId]"
            level="INFO" />
    </flow>
    

    IMO Mule is not doing the right thing here so I’ve reported the issue as a bug: http://www.mulesoft.org/jira/browse/MULE-6577

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there way to get file from windows xp command prompt? I tried to
Is there way to set @include mixin(); to variable? I tried this @mixin bg-gradient($fallback,
Is there way that I can read the file from remote server using fopen
Is there any way I can set a formatter on models that will convert
Is there a way to reset the Application, via onApplicationStart, and ensure that all
Is there a way to detect, from within the finally clause, that an exception
Is there way to automatically maximize the output window on hitting build and then
Is there way to copy a file into Plone with WebDAV and have Plone
is there way how to get name ov event from Lambda expression like with
Is there way to better identify design pattern in source codes, esp. if you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.