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

Christopher L. Shannon commented on AMQ-5942:
---------------------------------------------

This doesn't really seem like a bug...it just seems like the documentation 
needs to be improved so that it is clear that the default is 1024 entries 
before eviction starts if nothing is specified.  A policy can easily be 
configured to increase the size if more entries are needed or to use the 
SimpleMessageGroupMapFactory for unlimited entries. 

Also, I don't think it would be a good idea to throw an error if more than 1024 
entries are added.  The LRU cache is designed to evict the oldest ones so it's 
not supposed to be an error condition to put more entries in there...the old 
ones just go away as intended.  However, a log statement could be added on 
eviction to warn that an entry is being evicted so it is at least clear what is 
happening.

> CachedMessageGroupMapFactory fails with large key sets
> ------------------------------------------------------
>
>                 Key: AMQ-5942
>                 URL: https://issues.apache.org/jira/browse/AMQ-5942
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.11.1
>            Reporter: Ben O'Day
>         Attachments: MessageGroupFactoryRouteTest.java
>
>
> the current default factory is the CachedMessageGroupMapFactory which uses an 
> LRUMap with a maxSize of 1024 keys.  If you use this with more than 1024 keys 
> and fail to explicitly increase the maxSize, then the message groups fails to 
> ensure ordering by group, same thread processing by group and overlapping 
> execution.  
> I have reproduced this behavior in the attached unit test (using Camel routes 
> as consumers)...if you switch to the SimpleMessageGroupMapFactory or increase 
> the max size of the cache above the number of keys...the issues go away
> two suggestions
> -throw an error when the maxSize is exceeded if using the 
> CachedMessageGroupMapFactory
> -make the SimpleMessageGroupMapFactory the default (unlimited)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to