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

Exchange header null after upgrading to 3.12 from 3.11.2 when using transacted

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.12.0
    • 3.13.0
    • camel-core
    • None
    • Unknown

    Description

      After upgrading camel from 3.11.2 to 3.12.0 I notice that a header I set in a processor is not being available "later on" anymore.

      It looks as follows:

      Route

      from(source)
        .process(myprocessor::setHeader)
        ...
        .process(anotherprocessor)
        ..
        .to(target)
      ;
      

      where myprocessor.setHeader does sth like

      void setHeader(Exchange exchange) {
        exchange.getIn().setHeader("my-header", 1234);
      }
      

      and anotherprocessor wants to access this header, e.g.

      @Override
      void process(Exchange exchange) {
        ...
        Long value = exchange.getIn().getHeader("my-header", Long.class);
        if (value == null) { 
          throw ..
        }
      }
      

      While with 3.11.x this works fine it stopped with 3.12.0.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            adoser Andre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: