activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjiv Jivan (JIRA)" <>
Subject [jira] Created: (AMQ-769) Expose MessageGroupMap implementation to be configurable via BrokerService property
Date Wed, 21 Jun 2006 18:10:51 GMT
Expose MessageGroupMap implementation to be configurable via BrokerService property

         Key: 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 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:
For more information on JIRA, see:

View raw message