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

Add a dynamic to that is simpler to use than recipient list

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.16.0
    • camel-core, eip
    • None
    • Unknown

    Description

      To do dynamic to then see this FAQ
      http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html

      I think we should consider a dynamic to variation, or make to dynamic out of the box?

      For example to send a message to a dynamic computed uri with a header that has a stock symbol name:

      <toD uri="jms:queue:stock-${header.stock}"/>
      

      Notice the toD for to dynamic.

      It should be as simple so its a one-liner like today. If you want a bit more elaborate then use recipient list. Also the language it uses is simple only.

      We could also ponder about making that defailt for <to> to use simple language. However a few components like file uses simple language in its parameters. So we would need to tell simple to be lenient and keep tokens it cannot parse at this time, so you can do:

      <to uri="file:inbox?fileName=backup-${file:name}"/>
      

      So parsing

      ${file:name}
      

      don't barf

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: