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

ProducerTemplateBuilder

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 2.18.0
    • camel-core
    • None
    • Unknown

    Description

      Would be nice with a fluent builder style for producer template, (not an extension) but similar as producer template.

      So you use the builder methods to build the command.

      ProducerTemplateBuilder builder = ...
      
      String reply = builder.withBody("Hello World").withHeader("foo", 123).withHeader("bar", 456).to("jms:queue:foo").request(String.class);
      

      or something like that.

      The current ProducerTemplate has an overload of methods that work with high and low level (eg Exchange, Processor vs strings).

      Would be nice with a simpler api that use a more modern fluent style, but donesn't have a ton of methods - but can do the 95% need.

      There is an ExchangeBuilder but its only for building an Exchange and its a bit too low level.

      Attachments

        Issue Links

          Activity

            People

              lb Luca Burgazzoli
              davsclaus Claus Ibsen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: