camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-3857) WireTap EIP - new message mode - Allow to set headers
Date Wed, 13 Apr 2011 11:48:05 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-3857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-3857.
--------------------------------

    Resolution: Fixed

> WireTap EIP - new message mode - Allow to set headers
> -----------------------------------------------------
>
>                 Key: CAMEL-3857
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3857
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-core
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.8.0
>
>
> If you use wiretap to send a new message to an endpoint, then you can only provide headers
if you use a Processor. However what people would like to do is to provide headers in the
DSL. Usually from XML DSL.
> So what you can do now in Java DSL
> {code}
>                     .wireTap("direct:tap")
>                         // create the new tap message body and headers
>                         .newExchangeBody(constant("Bye World"))
>                         .newExchangeHeader("id", constant(123))
>                         .newExchangeHeader("date", simple("${date:now:yyyyMMdd}"))
>                     .end()
> {code}
> And in XML DSL (has a slight different names for body/header), to reuse the existing
<setHeader> element
> {code:xml}
>             <wireTap uri="direct:tap">
>                 <!-- create the new tap message body and headers -->
>                 <body><constant>Bye World</constant></body>
>                 <setHeader headerName="id"><constant>123</constant></setHeader>
>                 <setHeader headerName="date"><simple>${date:now:yyyyMMdd}</simple></setHeader>
>             </wireTap>
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message