Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove RedisClient from MonitoringHandler #15

Closed
mcweba opened this issue Apr 11, 2016 · 0 comments
Closed

Remove RedisClient from MonitoringHandler #15

mcweba opened this issue Apr 11, 2016 · 0 comments
Assignees

Comments

@mcweba
Copy link
Collaborator

mcweba commented Apr 11, 2016

The MonitoringHandler class provides methods to access the queueing functionality. Queue functionality is provided by the Redisques module and can be accessed through the EventBus.

Address.redisquesAddress().

In MonitoringHandler, the queueing functionality is directly accessed via the RedisClient. See example below:

redisClient.llen(queueName, reply -> {
    if(reply.failed()){
        log.error("Error gathering queue size for queue '" + queue + "'");
    } else {
        final long count = reply.result();
        vertx.eventBus().publish(Address.monitoringAddress(), new JsonObject().put(METRIC_NAME, prefix + LAST_USED_QUEUE_SIZE_METRIC).put(METRIC_ACTION, "update").put("n", count));
    }
});

This direct database access through the RedisClient should be omitted, because the correct way would be to use the Redisques module.
Maybe the Redisques module has to be extended to provide the needed information.

@mcweba mcweba self-assigned this Apr 29, 2016
mcweba added a commit that referenced this issue May 4, 2016
…m redisques module. Deprecated gateleens RedisquesAPI class.
@mcweba mcweba closed this as completed May 4, 2016
mcweba added a commit that referenced this issue May 4, 2016
roggerj pushed a commit to roggerj/gateleen that referenced this issue Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant