So that's one way of doing it. I assume you'd want that customized to include headers or not, right?

Now how's that different than having an expression (actually any number of specialized expressions), returning the size calculated using your algorithm of choice. Set your header of choice with the value and use it in other expressions for processing (content based routing may be a typical case).

My $0.02,
Hadrian



On 11/23/2013 03:20 PM, Jan Matèrne (jhm) wrote:
Store the object in a byte array and count the bytes?

Jan

-----Ursprüngliche Nachricht-----
Von: Hadrian Zbarcea [mailto:hzbar...@gmail.com]
Gesendet: Samstag, 23. November 2013 20:00
An: users@camel.apache.org
Betreff: Re: [Feature Enhancement] Camel body size

I wonder how you'd implement that in the general case. A pojo, array of
pojos, do you include the size of the headers, are headers pojos,
arrays of pojos... What about properties...

Hadrian


On 11/22/2013 03:57 PM, Matt Pavlovich wrote:
Hello-

I opened a ticket to request adding a feature for components to
provide a Body size to the Exchange that could be used by Simple, or
set as a header.

https://issues.apache.org/jira/browse/CAMEL-6984

I see it solving a couple things:

1. Provide throughput metrics
2. Route based on message sizing

What does the community think about this? Any suggestions on
improvements/features or implementation approaches?

Thanks,
Matt Pavlovich


Reply via email to