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

Improve ProducerTemplate documentation and code examples using ProducerTemplate

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.0
    • Fix Version/s: None
    • Component/s: documentation
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      I'm currently reading about error handling in Camel, specifically Using a Processor as a failure handler.

      The code example lists

      Code Example
      // send it to our mock endpoint
      exchange.getContext().createProducerTemplate().send("mock:myerror", exchange);
      

      According to the Javadoc of createProducerTemplate() and ProducerTemplate this is problematic:

      Since we're all lazy devs, we tend to copy paste code listings and think we're done.

      I suggest the following:

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              thokuest Thomas K├╝stermann
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: