Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-993 NPE in TraceFormatter
  3. CAMEL-393

BatchProcessor always consumes directly from endpoint ignoring previous steps

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0, 2.0-M1
    • camel-core
    • None

    Description

      Aggregator when created connects itself directly to the endpoint it 'originates' - not to the last step of processing so in such case

      from("seda:header").setHeader("visited", constant(true)).aggregator(header("cheese")).to("mock:result");
      

      at mock:result visited header is not set and in fact there are two different routes created that start from seda:header: one directly to aggregator, and the second one to setHeader().

      In case of direct endpoint everything works because direct component invokes flows one-by-one so it will set the header, and then aggregate, but with seda it doesn't work.

      Lets look at the test I added to AggregatorTest class to see the problem (_testAggregatorNotAtStart()). This test doesn't pass so far and I was unable to fix it, because I'm not good enough in DSL code. maybe someone could handle this.
      Another solution is to let to specify aggregator in RouteType so it could be used only just after from().

      Attachments

        1. CAMEL_393.patch
          3 kB
          Claus Ibsen

        Activity

          People

            hadrian Hadrian Zbarcea
            romkal Roman Kalukiewicz
            Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: