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

Claus Ibsen edited comment on CAMEL-16213 at 2/23/21, 3:47 PM:
---------------------------------------------------------------

TODO: PooledExchange interface and move new api added to extended exchange to 
here *DONE*
TODO: DefaultPooledExchange impl extending DefaultExchange and created by the 
factory *DONE*
TODO: ExchangeFactory javadoc to highlight its for consumer only *DONE*
TODO: statistics enabled off by default *DONE*
TODO: configuration option in camel-main to turn this on|off *DONE*
TODO: all components that has consumer to use the factory *IN PROGRESS*
TODO: add unit test in camel-core *DONE*
TODO: capture metrics in pooled factory so we can gather how many exchanges are 
pooled (also jmx mbean)
TODO: recycle OUT when its DefaultMessage vs special implementation (check if 
any problems - eg camel-jms maybe?) *WONT FIX* (we do not reuse OUT)
TODO: external pool with eviction (caffeine or the one luca mentioned?)



was (Author: davsclaus):
TODO: PooledExchange interface and move new api added to extended exchange to 
here *DONE*
TODO: DefaultPooledExchange impl extending DefaultExchange and created by the 
factory *DONE*
TODO: ExchangeFactory javadoc to highlight its for consumer only *DONE*
TODO: statistics enabled off by default *DONE*
TODO: configuration option in camel-main to turn this on|off *DONE*
TODO: all components that has consumer to use the factory *IN PROGRESS*
TODO: add unit test in camel-core *DONE*
TODO: capture metrics in pooled factory so we can gather how many exchanges are 
pooled (also jmx mbean)
TODO: recycle OUT when its DefaultMessage vs special implementation (check if 
any problems - eg camel-jms maybe?)
TODO: external pool with eviction (caffeine or the one luca mentioned?)


> camel-core - Exchange pooling
> -----------------------------
>
>                 Key: CAMEL-16213
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16213
>             Project: Camel
>          Issue Type: New Feature
>          Components: came-core
>            Reporter: Luca Burgazzoli
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 3.9.0
>
>
> By default a brand new exchange is created for each message received by a 
> component and that's usually fine but for very simple routes, like those 
> created by the camel-kafka-connector or the Kantive Sources in camel-k it may 
> be useful to have an option to create pools of reusable exchanges as:
> - exchanges are short living objects and routes are simple 
> - exchanges are heavy (multiple maps for properties and headers)
> - camel-kafka-connector and knative sources are likely to receive the same 
> messages type, with the same set of headers so the maps allocated by the 
> exchange can safely be recycled to reduce allocations and resizing
> In addition to the reason above, we can leverages exchange pooling to:
> - implement back pressure driven by the resource constraints to be sure we 
> don't exceed resources consumption and we don't degrade the the service (i.e. 
> long GC pause) 
> - have a way to create tailored exchanges, i.e. by providing an exchange that 
> does not have in/out but just in  
> An example of fast and efficient ASL2 licensed object pooling: 
> https://github.com/chrisvest/stormpot



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to