Hi

No see the javadoc

You need to turn on event timestamps

On Mon, Nov 20, 2023 at 4:32 PM ski n <raymondmees...@gmail.com> wrote:

> In Camel 3.20.8 I use the event notifier (as described here
> https://dzone.com/articles/event-notifier-apache-camel).
>
> One of the things I try to get timestamps. These timestamps are available
> on several levels:
>
> 1. Event level
> 2. Exchange level
> 3. Message level
>
> When I used the following the get the timestamps:
>
> CamelEvent.ExchangeEvent exchangeEvent = (CamelEvent.ExchangeEvent) event;
>
> // Get the message exchange from exchange event
> Exchange exchange = exchangeEvent.getExchange();
>
> System.out.println("Timestamp 1 " + event.getTimestamp());
> System.out.println("Timestamp 2 " + exchangeEvent.getTimestamp());
> System.out.println("Timestamp 3 " + exchange.getCreated());
> System.out.println("Timestamp 4 " +
> exchange.getIn().getMessageTimestamp());
>
>
> Only timestamp 3 (exchange.getCreated()) gives a timestamp, but the others
> are 0. For message timestamps this can be correct (as that depends on
> ActiveMQ etc), but shouldn't the event always a timestamp?
>
> Raymond
>


-- 
Claus Ibsen
-----------------
@davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to