You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Norman Maurer (JIRA)" <ji...@apache.org> on 2010/03/18 14:43:46 UTC

[jira] Created: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Configurable cache size for  ConsumerTemplate and ProducerTemplate
------------------------------------------------------------------

                 Key: CAMEL-2558
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
             Project: Apache Camel
          Issue Type: Improvement
            Reporter: Norman Maurer


The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58689#action_58689 ] 

Claus Ibsen commented on CAMEL-2558:
------------------------------------

Added FAQ
http://cwiki.apache.org/confluence/display/CAMEL/How+do+I+configure+the+default+maximum+cache+size+for+ProducerCache+or+ProducerTemplate

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-2558:
-------------------------------

    Affects Version/s: 2.2.0
        Fix Version/s: 2.3.0

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58688#action_58688 ] 

Claus Ibsen commented on CAMEL-2558:
------------------------------------

trunk: 931471.

ProducerCache is now managed in JMX so you can keep an eye on it

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-2558:
----------------------------------

    Assignee: Claus Ibsen

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "christian ohr (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58579#action_58579 ] 

christian ohr commented on CAMEL-2558:
--------------------------------------

Configurability should also include the Spring component's way of defining a CamelContext. Currently not all available setters can be adressed using properties below <camel:context> (at least it's not obvious nor documented). 
E.g., I could not register a custom ProducerServicePool (or configure the default one with a lower capacity) even though there's a CamelContext setter for this.

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>            Reporter: Norman Maurer
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58686#action_58686 ] 

Claus Ibsen commented on CAMEL-2558:
------------------------------------

The {{ProducerServicePool}} does not have any eviction logic etc. So when you hit the max capacity it throws an exception. So it doesn't really make much sense to lower the capacity as you are more likely to hit an exception.

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58683#action_58683 ] 

Claus Ibsen commented on CAMEL-2558:
------------------------------------

trunk: 931444.

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58685#action_58685 ] 

Claus Ibsen commented on CAMEL-2558:
------------------------------------

You can change the default size of 1000, to a custom value.

By setting a property on CamelContext properties with the key - Exchange#MAXIMUM_CACHE_POOL_SIZE

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-2558.
--------------------------------

    Resolution: Fixed

Lets call it a day for this.

In the future if really needed we can consider having micro management of cache sizes for the EIPs as well.

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58670#action_58670 ] 

Claus Ibsen commented on CAMEL-2558:
------------------------------------

Its more work than at first sight.

This would require end users to {{start}} their {{ProducerTemplate}} before use. In fact the javadoc already states this. But currently you could still use it without have started it.
This will enforce better resource management as end users must start/stop those templates.

It now has a getter/setter for {{maximumCacheSize}} so you can use another value than the default of 1000.
You can do this from both Java and Spring XML as <template/> has it as an attribute.

A global option will also be possible on CamelContext so you can configure this for all cache pools.

Also the EIP patterns which uses a ProducerCache will be retrofitted:
- routing slip
- send (to / toAsync / wireTap etc.)
- recipient list

I wonder if they should
- share one global cache
- have their local cache (= as now)
- option in the DSL to set an individual cache size

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-2558) Configurable cache size for ConsumerTemplate and ProducerTemplate

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=58684#action_58684 ] 

Claus Ibsen commented on CAMEL-2558:
------------------------------------

You can now set a {{maximumCacheSize}} on those templates. Both from Java DSL and Spring XML. Also {{CamelContext}} now has a {{createXXX}} method which has a cache size parameter.

> Configurable cache size for  ConsumerTemplate and ProducerTemplate
> ------------------------------------------------------------------
>
>                 Key: CAMEL-2558
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2558
>             Project: Apache Camel
>          Issue Type: Improvement
>    Affects Versions: 2.2.0
>            Reporter: Norman Maurer
>            Assignee: Claus Ibsen
>             Fix For: 2.3.0
>
>
> The cache size of the ConsumerTemplate and ProducerTemplate should be configurable to help to prevent OOM when every call use an other endpoint uri.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.