[ https://issues.apache.org/activemq/browse/AMQ-769?page=comments#action_36708 ] james strachan commented on AMQ-769: ------------------------------------
BTW a quick warning about SimpleMessageGroupMap - if you use lots of different message group IDs then there is a chance of a memory leak as they may not be closed down properly by bad JMS clients. But you are right we need a way to make it easier to supply a different MessageGroupMap implementation. Am working on it right now - should have something soon > Expose MessageGroupMap implementation to be configurable via BrokerService > property > ----------------------------------------------------------------------------------- > > Key: AMQ-769 > URL: https://issues.apache.org/activemq/browse/AMQ-769 > Project: ActiveMQ > Issue Type: Improvement > Components: Broker > Affects Versions: 4.0 > Environment: Active MQ 4.0 > Reporter: Sanjiv Jivan > > I need to use the SimpleMessageGroupMap implmentation of MessageGroupMap > instad of the default MessageGroupHashBucket implmentation. Presently there's > no easy way to do this. Additionally the member "messageGroupOwners" in > org.apache.activemq.broker.region.Queue is private, with no setter and the > getter has > public MessageGroupMap getMessageGroupOwners() { > if (messageGroupOwners == null) { > messageGroupOwners = new > MessageGroupHashBucket(messageGroupHashBucketCount); > } > return messageGroupOwners; > } > So basically there's no easy way to use another implmentation of > MessageGroupMap in this class. (This lazy create method is also not > threadsafe. Might be better to default initialize messageGroupOwners ) > I had to jump through a bunh of hoops, starting with subclassing > BrokerService exposing the messageGroupOwners class, followed by overriding > createRegionBroker() where it creates an annonymous subclass of RegionBroker > , overriding createQueueRegion and createTempQueueRegion where I create > subclasses of QueueRegion and TempQueueRegion respectively to have them be > configured to use the configured MessageGroupMap. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/activemq/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira