JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-5838

JMSMessageToObject fails to set Correlation-ID when passed as inbound property

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Patch submission Patch submission
  • Status: Closed Closed
  • Priority: Critical Critical
  • Resolution: Fixed
  • Affects Version/s: 3.1.2
  • Fix Version/s: 3.1.4 (EE only), 3.2.2 (EE only)
  • Component/s: Transport: JMS
  • Labels:
    • correlationid
    • jms
  • User impact:
    High
  • Similar Issues:
    None
  • Effort:
    XS

Description

The jms: object-to-jmsmessage-transformer fails to set the correlation ID if it is contained in the inbound scope instead of the outbound scope (which probably is when the correlation ID has been set in a previous service).

The class org.mule.transport.jms.transformers. AbstractJmsTransformer iterates through all outbound properties and sets the correlationID when it reaches MULE_CORRELATION_ID_PROPERTY. The correlation ID doesn´t necessarily have to be defined as outbound property (which can also be seen in org.mule. DefaultMuleMessage#getCorrelationId()). I´ll attach a suggestion for a fix of this bug.

As temporary workaround one can add the correlation ID to the outbound scope using the following message-property-transformer:
<message-properties-transformer scope="outbound">
<add-message-property key="MULE_CORRELATION_ID" value="#[mule:message.correlationId]" />
</message-properties-transformer>

  • Options
    • Sort By Name
    • Sort By Date
    • Ascending
    • Descending
    • Download All

Attachments

  1. Java Source File
    AbstractJmsTransformer.java
    19/Oct/11 07:57 AM
    7 kB
    Tarik Osman
  2. Text File
    AbstractJmsTransformer.patch
    19/Oct/11 07:57 AM
    2 kB
    Tarik Osman
  3. Hide
    Zip Archive
    testcase-5838.zip
    04/Nov/11 08:37 AM
    2 kB
    Tarik Osman
    1. File
      META-INF/MANIFEST.MF 0.1 kB
    2. XML File
      test/resources/integration/jms-5838.xml 3 kB
    3. XML File
      test/resources/.../connector-jms-5838.xml 1 kB
    4. Java Source File
      test/java/.../Jms5838TestCase.java 1 kB
    Download Zip
    Show
    Zip Archive
    testcase-5838.zip
    04/Nov/11 08:37 AM
    2 kB
    Tarik Osman

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Tarik Osman added a comment - 19/Oct/11 07:57 AM

Suggested fix

Show
Tarik Osman added a comment - 19/Oct/11 07:57 AM Suggested fix
Hide
Permalink
Mike Schilling added a comment - 03/Nov/11 11:12 AM

Please attach a test case to the bug.

Show
Mike Schilling added a comment - 03/Nov/11 11:12 AM Please attach a test case to the bug.
Hide
Permalink
Tarik Osman added a comment - 04/Nov/11 08:37 AM

The testcase is intended to run in the JMS transport maven module.

Show
Tarik Osman added a comment - 04/Nov/11 08:37 AM The testcase is intended to run in the JMS transport maven module.
Hide
Permalink
Tarik Osman added a comment - 04/Nov/11 08:46 AM

This bug only seems to occur in combination with the multicasting-router and cannot be reproduced with a pass-through-router (nor does it occur if a VM-Connector is used instead of JMS). I assume that it may also be a side effect of the enableCorrelation Attribute of the multicasting-router.

Show
Tarik Osman added a comment - 04/Nov/11 08:46 AM This bug only seems to occur in combination with the multicasting-router and cannot be reproduced with a pass-through-router (nor does it occur if a VM-Connector is used instead of JMS). I assume that it may also be a side effect of the enableCorrelation Attribute of the multicasting-router.
Hide
Permalink
Stephen Fenech added a comment - 22/Jan/12 03:29 AM

I would say that the bug is not in the AbstractJmsTransformer but rather in the AbstractSequenceRouter (parent of multicast router), that is why the flow works with passthrough and not with the multicaster. The passthrough calls the getRoute on the FilteringOutboundRouter which calls the propagateMagicProperties which copies the MULE_CORRELATION_ID_PROPERTY from inbound to outbound. This is not done by the AbstractSequenceRouter and so these values are not copied over.

In the case of the VM transport, it works due to the way messages are changed from outbound to inbound and thus copies the inbound MULE_CORRELATION_ID_PROPERTY to the outbound scope.

A working fix would be to use the getRoute(i,Event) method instead of routes.get

Show
Stephen Fenech added a comment - 22/Jan/12 03:29 AM I would say that the bug is not in the AbstractJmsTransformer but rather in the AbstractSequenceRouter (parent of multicast router), that is why the flow works with passthrough and not with the multicaster. The passthrough calls the getRoute on the FilteringOutboundRouter which calls the propagateMagicProperties which copies the MULE_CORRELATION_ID_PROPERTY from inbound to outbound. This is not done by the AbstractSequenceRouter and so these values are not copied over. In the case of the VM transport, it works due to the way messages are changed from outbound to inbound and thus copies the inbound MULE_CORRELATION_ID_PROPERTY to the outbound scope. A working fix would be to use the getRoute(i,Event) method instead of routes.get
Hide
Permalink
Stephen Fenech added a comment - 30/Jan/12 11:54 PM

Fixed in :
3.1.x Commit : 23761 :https://fisheye.codehaus.org/changelog/mule/?cs=23761
3.2.x Commit : 23763 :https://fisheye.codehaus.org/changelog/mule/?cs=23763
3.x Commit : 23764 :https://fisheye.codehaus.org/changelog/mule/?cs=23764

Show
Stephen Fenech added a comment - 30/Jan/12 11:54 PM Fixed in : 3.1.x Commit : 23761 :https://fisheye.codehaus.org/changelog/mule/?cs=23761 3.2.x Commit : 23763 :https://fisheye.codehaus.org/changelog/mule/?cs=23763 3.x Commit : 23764 :https://fisheye.codehaus.org/changelog/mule/?cs=23764
Hide
Permalink
Daniel Feist added a comment - 02/Feb/12 07:16 AM

Stephen, can this be closed?

Show
Daniel Feist added a comment - 02/Feb/12 07:16 AM Stephen, can this be closed?

People

  • Assignee:
    Stephen Fenech
    Reporter:
    Tarik Osman
Vote (1)
Watch (3)

Dates

  • Created:
    19/Oct/11 07:55 AM
    Updated:
    15/Feb/12 08:45 AM
    Resolved:
    15/Feb/12 08:45 AM

Time Tracking

Estimated:
2h
Original Estimate - 2 hours
Remaining:
2h
Remaining Estimate - 2 hours
Logged:
Not Specified
Time Spent - Not Specified

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.