diff --git a/src/main/java/org/swisspush/redisques/RedisQues.java b/src/main/java/org/swisspush/redisques/RedisQues.java index cec5d69..afc3434 100644 --- a/src/main/java/org/swisspush/redisques/RedisQues.java +++ b/src/main/java/org/swisspush/redisques/RedisQues.java @@ -1186,7 +1186,9 @@ private Future checkQueues() { if (notifyConsumerEvent.failed()) log.warn("TODO error handling", exceptionFactory.newException("notifyConsumer(" + queueName + ") failed", notifyConsumerEvent.cause())); - log.debug("refreshRegistration for queue {} time used is {} ms", queueName, System.currentTimeMillis() - perQueueStartTs); + if (log.isTraceEnabled()) { + log.trace("refreshRegistration for queue {} time used is {} ms", queueName, System.currentTimeMillis() - perQueueStartTs); + } onDone.accept(null, null); }); }); diff --git a/src/main/java/org/swisspush/redisques/util/RedisquesConfiguration.java b/src/main/java/org/swisspush/redisques/util/RedisquesConfiguration.java index 6a4ea3b..00074de 100644 --- a/src/main/java/org/swisspush/redisques/util/RedisquesConfiguration.java +++ b/src/main/java/org/swisspush/redisques/util/RedisquesConfiguration.java @@ -90,7 +90,7 @@ public class RedisquesConfiguration { public static final String PROP_METRIC_STORAGE_NAME = "metric-storage-name"; public static final String PROP_METRIC_REFRESH_PERIOD = "metric-refresh-period"; public static final String PROP_REFRESH_PERIOD = "refresh-period"; - public static final String PROP_CONSUMERLOCKMULTIPLIER = "consumer-lock-multiplier"; + public static final String PROP_CONSUMER_LOCK_MULTIPLIER = "consumer-lock-multiplier"; public static final String PROP_REDIS_HOST = "redisHost"; public static final String PROP_REDIS_HOST_LIST = "redisHosts"; public static final String PROP_REDIS_PORT = "redisPort"; @@ -383,7 +383,7 @@ public JsonObject asJsonObject() { obj.put(PROP_METRIC_STORAGE_NAME, getMetricStorageName()); obj.put(PROP_METRIC_REFRESH_PERIOD, getMetricRefreshPeriod()); obj.put(PROP_REFRESH_PERIOD, getRefreshPeriod()); - obj.put(PROP_CONSUMERLOCKMULTIPLIER, getConsumerLockMultiplier()); + obj.put(PROP_CONSUMER_LOCK_MULTIPLIER, getConsumerLockMultiplier()); obj.put(PROP_REDIS_HOST, getRedisHost()); obj.put(PROP_REDIS_HOST_LIST, getRedisHosts()); obj.put(PROP_REDIS_PORT, getRedisPort()); @@ -445,8 +445,8 @@ public static RedisquesConfiguration fromJsonObject(JsonObject json) { if (json.containsKey(PROP_REFRESH_PERIOD)) { builder.refreshPeriod(json.getInteger(PROP_REFRESH_PERIOD)); } - if (json.containsKey(PROP_CONSUMERLOCKMULTIPLIER)) { - builder.consumerLockMultiplier(json.getInteger(PROP_CONSUMERLOCKMULTIPLIER)); + if (json.containsKey(PROP_CONSUMER_LOCK_MULTIPLIER)) { + builder.consumerLockMultiplier(json.getInteger(PROP_CONSUMER_LOCK_MULTIPLIER)); } if (json.containsKey(PROP_REDIS_HOST)) { builder.redisHost(json.getString(PROP_REDIS_HOST)); diff --git a/src/test/java/org/swisspush/redisques/util/RedisquesConfigurationTest.java b/src/test/java/org/swisspush/redisques/util/RedisquesConfigurationTest.java index 9cd2da9..b82e2a7 100644 --- a/src/test/java/org/swisspush/redisques/util/RedisquesConfigurationTest.java +++ b/src/test/java/org/swisspush/redisques/util/RedisquesConfigurationTest.java @@ -131,7 +131,7 @@ public void testGetDefaultAsJsonObject(TestContext testContext) { testContext.assertEquals(json.getString(PROP_PROCESSOR_ADDRESS), "redisques-processor"); testContext.assertEquals(json.getInteger(PROP_METRIC_REFRESH_PERIOD), 10); testContext.assertEquals(json.getInteger(PROP_REFRESH_PERIOD), 10); - testContext.assertEquals(json.getInteger(PROP_CONSUMERLOCKMULTIPLIER), 2); + testContext.assertEquals(json.getInteger(PROP_CONSUMER_LOCK_MULTIPLIER), 2); testContext.assertEquals(json.getString(PROP_REDIS_HOST), "localhost"); testContext.assertEquals(json.getInteger(PROP_REDIS_PORT), 6379); testContext.assertFalse(json.getBoolean(PROP_REDIS_ENABLE_TLS)); @@ -219,7 +219,7 @@ public void testGetOverriddenAsJsonObject(TestContext testContext) { testContext.assertEquals(json.getInteger(PROP_REDIS_READY_CHECK_INTERVAL_MS), 5000); testContext.assertEquals(json.getString(PROP_PUBLISH_METRICS_ADDRESS), "eventbus-addr-1"); testContext.assertEquals(json.getString(PROP_METRIC_STORAGE_NAME), "queue"); - testContext.assertEquals(json.getInteger(PROP_CONSUMERLOCKMULTIPLIER), 3); + testContext.assertEquals(json.getInteger(PROP_CONSUMER_LOCK_MULTIPLIER), 3); // queue configurations JsonArray queueConfigurationsJsonArray = json.getJsonArray(PROP_QUEUE_CONFIGURATIONS); List queueConfigurationJsonObjects = queueConfigurationsJsonArray.getList(); @@ -274,7 +274,7 @@ public void testGetOverriddenFromJsonObject(TestContext testContext) { json.put(PROP_REDIS_PREFIX, "new_redis-prefix"); json.put(PROP_PROCESSOR_ADDRESS, "new_processor-address"); json.put(PROP_REFRESH_PERIOD, 99); - json.put(PROP_CONSUMERLOCKMULTIPLIER, 91); + json.put(PROP_CONSUMER_LOCK_MULTIPLIER, 91); json.put(PROP_METRIC_REFRESH_PERIOD, 55); json.put(PROP_REDIS_HOST, "newredishost"); json.put(PROP_REDIS_PORT, 4321);