Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-1414

JMSMessage vanishes attachments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0-M1, 1.6.1
    • camel-jms
    • None
    • Patch Available

    Description

      When using this kind of route
      <from uri="activemq:queue:test"/>
      <camel:process ref="mailProcessor" />
      <to uri="smtp://localhost:25?to=user@localhost" />

      and trying to enrich the message in the mailProcessor with

      exchange.getIn().addAttachment("attachement.txt",
      new DataHandler("Hello world", "text/plain"));

      The received mail doesn't contains any attachment.

      If the input "from" is a "direct" instead of activemq, it works fine.

      Inspecting source code, MessageSupport.copyFrom(Message that) does
      getAttachments().putAll(that.getAttachments());
      but the child class JmsMessage doesn't.

      Attachments

        1. JmsMessageCopyAttachments.diff
          0.5 kB
          Nicolas Bouillon

        Activity

          People

            njiang Willem Jiang
            bouil Nicolas Bouillon
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: