camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-3104) ExchangeBuilder to create messages using fluent builder style
Date Wed, 29 Aug 2012 06:50:08 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-3104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443850#comment-13443850
] 

Claus Ibsen commented on CAMEL-3104:
------------------------------------

We have to consider Camel 2.x API stable, and therefore be more careful when adding stuffs
to the core that is API facing to our end users.

For example which package should it be placed? In the root package, or the builder package?
Or in the util, which seems a bit misplaced.

But it will be a nice addition, and as Willem says, does not affect other APIs in the core,
and therefore not impose any risks. 
                
> ExchangeBuilder to create messages using fluent builder style
> -------------------------------------------------------------
>
>                 Key: CAMEL-3104
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3104
>             Project: Camel
>          Issue Type: New Feature
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Willem Jiang
>             Fix For: 3.0.0
>
>         Attachments: ExchangeBuilder.diff
>
>
> 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.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message