Expose MessageGroupMap implementation to be configurable via BrokerService property -----------------------------------------------------------------------------------
Key: AMQ-769 URL: https://issues.apache.org/activemq/browse/AMQ-769 Project: ActiveMQ Type: Improvement Components: Broker 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