You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The feature to reset the consumers uses the KEYS command of redis. This command should not be used in productive environments because it may ruin performance when it's executed against large databases. See corresponding Documentation
See code below:
privatevoidresetConsumers() {
log.debug("RedisQues Resetting consumers");
StringkeysPattern = redisPrefix + consumersPrefix + "*";
if (log.isTraceEnabled()) {
log.trace("RedisQues reset consumers keys: " + keysPattern);
}
redisClient.keys(keysPattern, keysResult -> {
if(keysResult.failed()) {
log.error("Unable to get redis keys of consumers");
return;
}
Listkeys = keysResult.result().getList();
if(keys == null || keys.size() < 1) {
log.debug("No consumers found to reset");
return;
}
redisClient.delMany(keys, delManyResult -> {
if (delManyResult.succeeded()) {
Longcount = delManyResult.result();
log.debug("Successfully reset " + count + " consumers");
} else {
log.error("Unable to delete redis keys of consumers");
}
});
});
}
As an alternative to the KEYS command the SCAN command should be used.
The text was updated successfully, but these errors were encountered:
The feature to reset the consumers uses the KEYS command of redis. This command should not be used in productive environments because it may ruin performance when it's executed against large databases. See corresponding Documentation
See code below:
As an alternative to the KEYS command the SCAN command should be used.
The text was updated successfully, but these errors were encountered: