      * @param subtopic The subtopic for the new subscription.
      *
      * @param selector The selector for the new subscription.
-     */
-    public function addSubscription(subtopic:String = null, selector:String = null):void
-    {
-        subscriptions.addItem(new SubscriptionInfo(subtopic, selector));
+     * 
+     * @param maxFrequency The maximum number of messages per second the Consumer wants
+     * to receive for the subscription. Note that this value overwrites the Consumer
+     * wide maxFrequency. 
+     */
+    public function addSubscription(subtopic:String = null, selector:String = null, maxFrequency:uint = 0):void
+    {
+        subscriptions.addItem(new SubscriptionInfo(subtopic, selector, maxFrequency));
     }
 
     /**


import flash.events.TimerEvent;
import flash.utils.Timer;
import mx.core.mx_internal;
import mx.collections.ArrayCollection;
import mx.events.PropertyChangeEvent;
import mx.events.CollectionEvent;
import mx.logging.ILogger;
import mx.logging.Log;
import mx.messaging.events.MessageEvent;
import mx.messaging.errors.MessagingError;
import mx.messaging.messages.AsyncMessage;
import mx.messaging.messages.CommandMessage;
import mx.messaging.messages.IMessage;


        for (var i:int = 0; i < subscriptions.length; i++)
        {
            var si:SubscriptionInfo = SubscriptionInfo(subscriptions.getItemAt(i));
            var temp:String = (si.subtopic == null ? "" : si.subtopic) + 
                                CommandMessage.SUBTOPIC_SEPARATOR + 
                                (si.selector == null ? "" : si.selector);
            // Add maxFrequency as another token.
            if (si.maxFrequency > 0)
                temp += CommandMessage.SUBTOPIC_SEPARATOR + si.maxFrequency;

            subs[temp] = true;
        }
        return subs;
    }
