I also need the payload size of a message (in bytes) for each event and totals if possible
Messages are mostly String, but can be any object basically (list, zip, mail, pdf, image). Is this possible? Or is there another way to get this kind of metric? The alternative is to offload it to, for example Elastic, but there maybe easier ways to get size stats. Raymond On Mon, Nov 20, 2023 at 11:23 PM ski n <raymondmees...@gmail.com> wrote: > Yes, I was suspecting something like that, but the Javadoc only says: > > "Timestamp for each event, when the event occurred. By default, the > timestamp is not included and this method returns 0." > > It does not say how and where it can be turned on. I first checked the > EventNotifierSupport class, but apparently it needs to be set on the > EventFactory: > > https://www.javadoc.io/static/org.apache.camel/camel-api/3.20.8/org/apache/camel/spi/EventFactory.html#setTimestampEnabled(boolean) > > Something like: > > context.getManagementStrategy().getEventFactory().setTimestampEnabled(true); > > Hope this will help someone. > > Raymond > >