You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2010/09/04 13:39:40 UTC

[jira] Created: (CAMEL-3104) ExchangeBuilder to create messages using fluent builder style

ExchangeBuilder to create messages using fluent builder style
-------------------------------------------------------------

                 Key: CAMEL-3104
                 URL: https://issues.apache.org/activemq/browse/CAMEL-3104
             Project: Apache Camel
          Issue Type: New Feature
          Components: camel-core
            Reporter: Claus Ibsen
             Fix For: 3.0.0


So you from the Java API using a fluent builder style, can create an Exchange to send, for example with the ProducerTemplate.

Currently you can use a inlined Processor to do that but its a bit ugly and verbose.

{code}
Exchange exchange = ExchangeBuilder("activemq:queue:foo").withBody("Hello World").andHeader("JMSReplyTo", "bar").andHeader("foo", 123).create();
template.send(exchange);
{code}

The trick is the Exchange has to be created by the producer and hence we need to know the endpoint uri where to send it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.