activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1241894 - /activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala
Date Wed, 08 Feb 2012 13:31:44 GMT
Author: chirino
Date: Wed Feb  8 13:31:43 2012
New Revision: 1241894

URL: http://svn.apache.org/viewvc?rev=1241894&view=rev
Log:
Fixes APLO-155 : 'total producers ever' counter on durable subs is always 0

Modified:
    activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala

Modified: activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala?rev=1241894&r1=1241893&r2=1241894&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala
(original)
+++ activemq/activemq-apollo/trunk/apollo-broker/src/main/scala/org/apache/activemq/apollo/broker/Queue.scala
Wed Feb  8 13:31:43 2012
@@ -282,7 +282,7 @@ class Queue(val router: LocalRouter, val
     rc.producer_counter = this.producer_counter
     rc.consumer_counter = this.consumer_counter
 
-    rc.producer_count = this.producers.size
+    rc.producer_count = this.inbound_sessions.size
     rc.consumer_count = this.all_subscriptions.size
     rc
   }
@@ -396,7 +396,7 @@ class Queue(val router: LocalRouter, val
   }
 
   def check_idle {
-    if (producers.isEmpty && all_subscriptions.isEmpty && queue_items==0
) {
+    if (inbound_sessions.isEmpty && all_subscriptions.isEmpty && queue_items==0
) {
       if (idled_at==0 && auto_delete_after!=0) {
         idled_at = now
         val idled_at_start = idled_at
@@ -928,6 +928,7 @@ class Queue(val router: LocalRouter, val
 
     dispatch_queue {
       inbound_sessions += this
+      producer_counter += 1
       change_producer_capacity( session_max )
     }
 
@@ -957,6 +958,7 @@ class Queue(val router: LocalRouter, val
       }
     }
   }
+
   def connect(p: DeliveryProducer) = new QueueDeliverySession(p)
 
   /////////////////////////////////////////////////////////////////////
@@ -1024,7 +1026,6 @@ class Queue(val router: LocalRouter, val
     } else {
       dispatch_queue {
         producers += producer
-        producer_counter += 1
         check_idle
       }
       producer.bind(this::Nil)



Mime
View raw message