[ 
https://issues.apache.org/jira/browse/CAMEL-21882?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939399#comment-17939399
 ] 

Claus Ibsen commented on CAMEL-21882:
-------------------------------------

You can make a custom predicate to use as completion in the aggregator, where 
you calculcate the current batch size and triggers accordingly. How to compute 
the message size depends on what content the message are (binary, json, xml 
etc) so its harder to make generic

> Aggregate by byte size
> ----------------------
>
>                 Key: CAMEL-21882
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21882
>             Project: Camel
>          Issue Type: Wish
>          Components: came-core
>            Reporter: Chirag Sanghavi
>            Priority: Trivial
>
> *User Story: Batch Message Aggregation in Apache Camel*
> *Given* a Camel route that processes messages for an endpoint supporting 
> batch consumption with a size limit (e.g., SQS with a 256KB limit), 
> *When* messages are aggregated using the Camel aggregate function, 
> *Then* messages should be grouped into batches without exceeding the size 
> limit (factoring in headers and payload), assuming that each individual 
> message is within the allowed limit.
> in place of putting logic in each endpoint, improving aggregate will help 
> multiple endpoints. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to