LOG for rate limiter
@@ -16,7 +16,6 @@ import org.joyqueue.nsr.event.RemoveTopicEvent;
import org.joyqueue.nsr.event.UpdateConfigEvent;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
@@ -27,10 +26,9 @@ import java.util.concurrent.ConcurrentMap;
*
**/
public class BrokerRetryRateLimiterManager implements RetryRateLimiter{
- protected static final Logger logger = LoggerFactory.getLogger(BrokerRetryRateLimiterManager.class);
+ protected static final Logger LOG = LoggerFactory.getLogger(BrokerRetryRateLimiterManager.class);
private ClusterManager clusterManager;
private ConsumeConfig consumeConfig;
- private static final int DEFAULT_CONSUMER_RETRY_RATE=500;
private ConcurrentMap<String /** topic **/, ConcurrentMap<String /** app **/, RateLimiter>> retryRateLimiters = Maps.newConcurrentMap();
public BrokerRetryRateLimiterManager(BrokerContext context){
@@ -56,6 +54,8 @@ public class BrokerRetryRateLimiterManager implements RetryRateLimiter{
RateLimiter oldRateLimiter = topicRateLimiters.putIfAbsent(app, consumerRetryRateLimiter);
if (oldRateLimiter != null) {
consumerRetryRateLimiter = oldRateLimiter;
+ }else{
+ LOG.info("New rate limiter for {},{},{}",topic,app,tps);
}
}
}
