The simplest is to retrieve the Date in the header of the message :

<setHeader headerName="Date">
        <simple>${date:now:yyyy-MM-dd'T'HH:mm:ss:SSS}</simple>
</setHeader>


As against this date format does not work? any idea?

Thank you in advance


Claus Ibsen-2 wrote:
> 
> On Tue, Jan 12, 2010 at 4:14 PM, titexe <tit...@yahoo.fr> wrote:
>>
>> Thank you for you reply,
>>
>> there's any component in Camel that retrieves the value of BrokerName?
>>  For example <simple> $ in.header.BrokerName () </ simple>
>>
>> How Velocity component retrieves the system date, It's possible to put
>> just
>> $ {date} in my VM files $ {date}?
>>
> 
> You can check out the Velocity user guide
> http://velocity.apache.org/engine/releases/velocity-1.6.2/user-guide.html
> 
> And then do a bit of google or look at the Velocity mailinglist.
> 
> And of course do some experiments as well.
> 
> 
>> titexe
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> On Tue, Jan 12, 2010 at 3:06 PM, titexe <tit...@yahoo.fr> wrote:
>>>>
>>>> Hello,
>>>>
>>>> a simple question:
>>>>
>>>> I want to retrieve the name of the broker to use it after in a
>>>> component
>>>> Velocity?
>>>>
>>>> How to get the system date in velocity?
>>>>
>>>
>>> Can you be more precise what you are looking for?
>>>
>>> You may want to check the Velocity documentation how to use its
>>> templating language if you e.g. want to get Date now = new Date()
>>> dates?
>>> And how to format it etc.
>>>
>>> Basically all the Camel headers is avail so you can grab those as
>>> well, so you can put a header with the broker name and date and then
>>> use those in the template.
>>> See some of the camel unit tests for that.
>>>
>>>> Thank you in advance.
>>>>
>>>> titexe
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/Retrieve-BrokerName---Velocity-tp27128040p27128040.html
>>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>> --
>> View this message in context:
>> http://old.nabble.com/Retrieve-BrokerName---Velocity-tp27128040p27129089.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Retrieve-BrokerName---Velocity-tp27128040p27130741.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to