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

camel-spring - Should auto register a ProducerTemplate and ConsumerTemplate

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-M3
    • 2.0.0
    • camel-spring
    • None

    Description

      When using camel in XML and you want to unit test or get hold of a producer template using IoC you need to declare it in the Spring XML file and define an id to it such as below

          <camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">
              <template id="template"/>
              <route>
                  <from uri="file://acme/inbox"/>
                  <to uri="file://acme/outbox"/>
              </route>
          </camelContext>
      

      I think we should default define a bean with the id

      • template = producer template (often named like this, so instead of naming it producerTemplate)
      • consumerTemplate = consumer template

      However if there is a <template> tag defined it should not auto register a bean

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: