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

pipeline function should have 0-parameter version

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.1.0
    • camel-core
    • None

    Description

      Currently the pipeline function takes an array of uri strings or Endpoints. It should also take 0 parameters to create a PipelineDefinition object that requires an end() to finish, similar to multicast(). To see why this is necessary, consider the multicast example from the wiki:

      <route>
      <from uri="activemq:SomeQueue"/>
      <multicast>
      <pipeline>
      <bean ref="something"/>
      <to uri="log:Something"/>
      </pipeline>
      <pipeline>
      <bean ref="foo"/>
      <bean ref="bar"/>
      <to uri="activemq:OutputQueue"/>
      </pipeline>
      </multicast>
      </route>

      Since the contents of the two pipelines are not just uri's there is no easy way to create this route in Java. If we had a pipeline() function, we could do it as follows:

      from("activemq:SomeQueue")
      .multicast()
      pipeline()
      .beanRef("something")
      .to("log:Something")
      .end() //pipeline
      .pipeline()
      .beanRef("foo")
      .beanRef="bar"/>
      .to("activemq:OutputQueue)
      .end() //pipeline
      .end() ;//multicast

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            joegottman Joe Gottman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: