@@ -40,6 +40,7 @@ public class RedisquesConfiguration {
4040 private final boolean httpRequestHandlerEnabled ;
4141 private final boolean httpRequestHandlerAuthenticationEnabled ;
4242 private final boolean micrometerMetricsEnabled ;
43+ private final String micrometerMetricsIdentifier ;
4344 private final String httpRequestHandlerPrefix ;
4445 private final String httpRequestHandlerUsername ;
4546 private final String httpRequestHandlerPassword ;
@@ -114,6 +115,7 @@ public class RedisquesConfiguration {
114115 public static final String PROP_HTTP_REQUEST_HANDLER_ENABLED = "httpRequestHandlerEnabled" ;
115116 public static final String PROP_HTTP_REQUEST_HANDLER_AUTH_ENABLED = "httpRequestHandlerAuthenticationEnabled" ;
116117 public static final String PROP_MICROMETER_METRICS_ENABLED = "micrometerMetricsEnabled" ;
118+ public static final String PROP_MICROMETER_METRICS_IDENTIFIER = "micrometerMetricsIdentifier" ;
117119 public static final String PROP_HTTP_REQUEST_HANDLER_PREFIX = "httpRequestHandlerPrefix" ;
118120 public static final String PROP_HTTP_REQUEST_HANDLER_USERNAME = "httpRequestHandlerUsername" ;
119121 public static final String PROP_HTTP_REQUEST_HANDLER_PASSWORD = "httpRequestHandlerPassword" ;
@@ -148,15 +150,16 @@ public RedisquesConfiguration(String address, String configurationUpdatedAddress
148150 String publishMetricsAddress , String metricStorageName , int metricRefreshPeriod , int refreshPeriod ,
149151 String redisHost , int redisPort , String redisAuth , int checkInterval ,
150152 int processorTimeout , long processorDelayMax , boolean httpRequestHandlerEnabled ,
151- boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled , String httpRequestHandlerPrefix ,
153+ boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled ,
154+ String micrometerMetricsIdentifier , String httpRequestHandlerPrefix ,
152155 String httpRequestHandlerUsername , String httpRequestHandlerPassword ,
153156 Integer httpRequestHandlerPort , String httpRequestHandlerUserHeader ,
154157 List <QueueConfiguration > queueConfigurations , boolean enableQueueNameDecoding ) {
155158 this (address , configurationUpdatedAddress , redisPrefix , processorAddress , publishMetricsAddress , metricStorageName ,
156159 metricRefreshPeriod , refreshPeriod , DEFAULT_CONSUMER_LOCK_MULTIPLIER , Collections .singletonList (redisHost ), Collections .singletonList (redisPort ),
157160 RedisClientType .STANDALONE , redisAuth , null , null , false , checkInterval ,
158161 processorTimeout , processorDelayMax , httpRequestHandlerEnabled ,
159- httpRequestHandlerAuthenticationEnabled , micrometerMetricsEnabled , httpRequestHandlerPrefix , httpRequestHandlerUsername ,
162+ httpRequestHandlerAuthenticationEnabled , micrometerMetricsEnabled , micrometerMetricsIdentifier , httpRequestHandlerPrefix , httpRequestHandlerUsername ,
160163 httpRequestHandlerPassword , httpRequestHandlerPort , httpRequestHandlerUserHeader , queueConfigurations ,
161164 enableQueueNameDecoding , DEFAULT_REDIS_MAX_POOL_SIZE , DEFAULT_REDIS_MAX_POOL_WAIT_SIZE ,
162165 DEFAULT_REDIS_MAX_PIPELINE_WAIT_SIZE , DEFAULT_QUEUE_SPEED_INTERVAL_SEC , DEFAULT_MEMORY_USAGE_LIMIT_PCT ,
@@ -173,15 +176,16 @@ public RedisquesConfiguration(String address, String configurationUpdatedAddress
173176 String publishMetricsAddress , String metricStorageName , int metricRefreshPeriod , int refreshPeriod ,
174177 String redisHost , int redisPort , String redisPassword , String redisUser , boolean redisEnableTls ,
175178 int checkInterval , int processorTimeout , long processorDelayMax , boolean httpRequestHandlerEnabled ,
176- boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled , String httpRequestHandlerPrefix ,
179+ boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled ,
180+ String micrometerMetricsIdentifier , String httpRequestHandlerPrefix ,
177181 String httpRequestHandlerUsername , String httpRequestHandlerPassword ,
178182 Integer httpRequestHandlerPort , String httpRequestHandlerUserHeader ,
179183 List <QueueConfiguration > queueConfigurations , boolean enableQueueNameDecoding ) {
180184 this (address , configurationUpdatedAddress , redisPrefix , processorAddress , publishMetricsAddress , metricStorageName ,
181185 metricRefreshPeriod , refreshPeriod , DEFAULT_CONSUMER_LOCK_MULTIPLIER , Collections .singletonList (redisHost ), Collections .singletonList (redisPort ),
182186 RedisClientType .STANDALONE , null , redisPassword , redisUser , redisEnableTls , checkInterval ,
183187 processorTimeout , processorDelayMax , httpRequestHandlerEnabled ,
184- httpRequestHandlerAuthenticationEnabled , micrometerMetricsEnabled , httpRequestHandlerPrefix , httpRequestHandlerUsername ,
188+ httpRequestHandlerAuthenticationEnabled , micrometerMetricsEnabled , micrometerMetricsIdentifier , httpRequestHandlerPrefix , httpRequestHandlerUsername ,
185189 httpRequestHandlerPassword , httpRequestHandlerPort , httpRequestHandlerUserHeader , queueConfigurations ,
186190 enableQueueNameDecoding , DEFAULT_REDIS_MAX_POOL_SIZE , DEFAULT_REDIS_MAX_POOL_WAIT_SIZE ,
187191 DEFAULT_REDIS_MAX_PIPELINE_WAIT_SIZE , DEFAULT_QUEUE_SPEED_INTERVAL_SEC , DEFAULT_MEMORY_USAGE_LIMIT_PCT ,
@@ -198,14 +202,15 @@ public RedisquesConfiguration(String address, String configurationUpdatedAddress
198202 String redisHost , int redisPort , RedisClientType redisClientType , String redisPassword ,
199203 String redisUser , boolean redisEnableTls , int checkInterval ,
200204 int processorTimeout , long processorDelayMax , boolean httpRequestHandlerEnabled ,
201- boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled , String httpRequestHandlerPrefix ,
205+ boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled ,
206+ String micrometerMetricsIdentifier , String httpRequestHandlerPrefix ,
202207 String httpRequestHandlerUsername , String httpRequestHandlerPassword ,
203208 Integer httpRequestHandlerPort , String httpRequestHandlerUserHeader ,
204209 List <QueueConfiguration > queueConfigurations , boolean enableQueueNameDecoding ) {
205210 this (address , configurationUpdatedAddress , redisPrefix , processorAddress , publishMetricsAddress , metricStorageName ,
206211 metricRefreshPeriod , refreshPeriod , DEFAULT_CONSUMER_LOCK_MULTIPLIER , Collections .singletonList (redisHost ), Collections .singletonList (redisPort ),
207212 redisClientType , null , redisPassword , redisUser , redisEnableTls , checkInterval , processorTimeout ,
208- processorDelayMax , httpRequestHandlerEnabled , httpRequestHandlerAuthenticationEnabled , micrometerMetricsEnabled , httpRequestHandlerPrefix , httpRequestHandlerUsername ,
213+ processorDelayMax , httpRequestHandlerEnabled , httpRequestHandlerAuthenticationEnabled , micrometerMetricsEnabled , micrometerMetricsIdentifier , httpRequestHandlerPrefix , httpRequestHandlerUsername ,
209214 httpRequestHandlerPassword , httpRequestHandlerPort , httpRequestHandlerUserHeader , queueConfigurations ,
210215 enableQueueNameDecoding , DEFAULT_REDIS_MAX_POOL_SIZE , DEFAULT_REDIS_MAX_POOL_WAIT_SIZE ,
211216 DEFAULT_REDIS_MAX_PIPELINE_WAIT_SIZE , DEFAULT_QUEUE_SPEED_INTERVAL_SEC , DEFAULT_MEMORY_USAGE_LIMIT_PCT ,
@@ -222,15 +227,16 @@ public RedisquesConfiguration(String address, String configurationUpdatedAddress
222227 int consumerLockMultiplier , String redisHost , int redisPort , RedisClientType redisClientType , String redisPassword ,
223228 String redisUser , boolean redisEnableTls , int checkInterval ,
224229 int processorTimeout , long processorDelayMax , boolean httpRequestHandlerEnabled ,
225- boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled , String httpRequestHandlerPrefix ,
230+ boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled ,
231+ String micrometerMetricsIdentifier , String httpRequestHandlerPrefix ,
226232 String httpRequestHandlerUsername , String httpRequestHandlerPassword ,
227233 Integer httpRequestHandlerPort , String httpRequestHandlerUserHeader ,
228234 List <QueueConfiguration > queueConfigurations , boolean enableQueueNameDecoding ) {
229235 this (address , configurationUpdatedAddress , redisPrefix , processorAddress , publishMetricsAddress , metricStorageName ,
230236 metricRefreshPeriod , refreshPeriod , consumerLockMultiplier , Collections .singletonList (redisHost ), Collections .singletonList (redisPort ),
231237 redisClientType , null , redisPassword , redisUser , redisEnableTls , checkInterval , processorTimeout ,
232238 processorDelayMax , httpRequestHandlerEnabled ,
233- httpRequestHandlerAuthenticationEnabled , micrometerMetricsEnabled , httpRequestHandlerPrefix , httpRequestHandlerUsername ,
239+ httpRequestHandlerAuthenticationEnabled , micrometerMetricsEnabled , micrometerMetricsIdentifier , httpRequestHandlerPrefix , httpRequestHandlerUsername ,
234240 httpRequestHandlerPassword , httpRequestHandlerPort , httpRequestHandlerUserHeader , queueConfigurations ,
235241 enableQueueNameDecoding , DEFAULT_REDIS_MAX_POOL_SIZE , DEFAULT_REDIS_MAX_POOL_WAIT_SIZE ,
236242 DEFAULT_REDIS_MAX_PIPELINE_WAIT_SIZE , DEFAULT_QUEUE_SPEED_INTERVAL_SEC , DEFAULT_MEMORY_USAGE_LIMIT_PCT ,
@@ -244,7 +250,7 @@ private RedisquesConfiguration(String address, String configurationUpdatedAddres
244250 int consumerLockMultiplier , List <String > redisHosts , List <Integer > redisPorts , RedisClientType redisClientType ,
245251 String redisAuth , String redisPassword , String redisUser , boolean redisEnableTls , int checkInterval ,
246252 int processorTimeout , long processorDelayMax , boolean httpRequestHandlerEnabled ,
247- boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled ,
253+ boolean httpRequestHandlerAuthenticationEnabled , boolean micrometerMetricsEnabled , String micrometerMetricsIdentifier ,
248254 String httpRequestHandlerPrefix , String httpRequestHandlerUsername , String httpRequestHandlerPassword ,
249255 Integer httpRequestHandlerPort , String httpRequestHandlerUserHeader ,
250256 List <QueueConfiguration > queueConfigurations , boolean enableQueueNameDecoding ,
@@ -313,6 +319,7 @@ private RedisquesConfiguration(String address, String configurationUpdatedAddres
313319 this .httpRequestHandlerEnabled = httpRequestHandlerEnabled ;
314320 this .httpRequestHandlerAuthenticationEnabled = httpRequestHandlerAuthenticationEnabled ;
315321 this .micrometerMetricsEnabled = micrometerMetricsEnabled ;
322+ this .micrometerMetricsIdentifier = micrometerMetricsIdentifier ;
316323 this .httpRequestHandlerPrefix = httpRequestHandlerPrefix ;
317324 this .httpRequestHandlerUsername = httpRequestHandlerUsername ;
318325 this .httpRequestHandlerPassword = httpRequestHandlerPassword ;
@@ -361,7 +368,7 @@ private RedisquesConfiguration(RedisquesConfigurationBuilder builder) {
361368 builder .redisPassword , builder .redisUser , builder .redisEnableTls , builder .checkInterval ,
362369 builder .processorTimeout , builder .processorDelayMax , builder .httpRequestHandlerEnabled ,
363370 builder .httpRequestHandlerAuthenticationEnabled ,
364- builder .micrometerMetricsEnabled , builder .httpRequestHandlerPrefix ,
371+ builder .micrometerMetricsEnabled , builder .micrometerMetricsIdentifier , builder . httpRequestHandlerPrefix ,
365372 builder .httpRequestHandlerUsername , builder .httpRequestHandlerPassword , builder .httpRequestHandlerPort ,
366373 builder .httpRequestHandlerUserHeader , builder .queueConfigurations ,
367374 builder .enableQueueNameDecoding ,
@@ -405,6 +412,7 @@ public JsonObject asJsonObject() {
405412 obj .put (PROP_HTTP_REQUEST_HANDLER_ENABLED , getHttpRequestHandlerEnabled ());
406413 obj .put (PROP_HTTP_REQUEST_HANDLER_AUTH_ENABLED , getHttpRequestHandlerAuthenticationEnabled ());
407414 obj .put (PROP_MICROMETER_METRICS_ENABLED , getMicrometerMetricsEnabled ());
415+ obj .put (PROP_MICROMETER_METRICS_IDENTIFIER , getMicrometerMetricsIdentifier ());
408416 obj .put (PROP_HTTP_REQUEST_HANDLER_PREFIX , getHttpRequestHandlerPrefix ());
409417 obj .put (PROP_HTTP_REQUEST_HANDLER_USERNAME , getHttpRequestHandlerUsername ());
410418 obj .put (PROP_HTTP_REQUEST_HANDLER_PASSWORD , getHttpRequestHandlerPassword ());
@@ -506,6 +514,9 @@ public static RedisquesConfiguration fromJsonObject(JsonObject json) {
506514 if (json .containsKey (PROP_MICROMETER_METRICS_ENABLED )) {
507515 builder .micrometerMetricsEnabled (json .getBoolean (PROP_MICROMETER_METRICS_ENABLED ));
508516 }
517+ if (json .containsKey (PROP_MICROMETER_METRICS_IDENTIFIER )) {
518+ builder .micrometerMetricsIdentifier (json .getString (PROP_MICROMETER_METRICS_IDENTIFIER ));
519+ }
509520 if (json .containsKey (PROP_HTTP_REQUEST_HANDLER_PREFIX )) {
510521 builder .httpRequestHandlerPrefix (json .getString (PROP_HTTP_REQUEST_HANDLER_PREFIX ));
511522 }
@@ -665,6 +676,10 @@ public boolean getHttpRequestHandlerAuthenticationEnabled() {
665676
666677 public boolean getMicrometerMetricsEnabled () { return micrometerMetricsEnabled ; }
667678
679+ public String getMicrometerMetricsIdentifier () {
680+ return micrometerMetricsIdentifier ;
681+ }
682+
668683 public String getHttpRequestHandlerPrefix () {
669684 return httpRequestHandlerPrefix ;
670685 }
@@ -790,6 +805,7 @@ public static class RedisquesConfigurationBuilder {
790805 private int processorTimeout ;
791806 private long processorDelayMax ;
792807 private boolean micrometerMetricsEnabled ;
808+ private String micrometerMetricsIdentifier ;
793809 private boolean httpRequestHandlerEnabled ;
794810 private boolean httpRequestHandlerAuthenticationEnabled ;
795811 private String httpRequestHandlerPrefix ;
@@ -976,6 +992,11 @@ public RedisquesConfigurationBuilder micrometerMetricsEnabled(boolean micrometer
976992 return this ;
977993 }
978994
995+ public RedisquesConfigurationBuilder micrometerMetricsIdentifier (String micrometerMetricsIdentifier ) {
996+ this .micrometerMetricsIdentifier = micrometerMetricsIdentifier ;
997+ return this ;
998+ }
999+
9791000 public RedisquesConfigurationBuilder httpRequestHandlerAuthenticationEnabled (boolean httpRequestHandlerAuthenticationEnabled ) {
9801001 this .httpRequestHandlerAuthenticationEnabled = httpRequestHandlerAuthenticationEnabled ;
9811002 return this ;
0 commit comments