0
我想使用Redis的发布 - 订阅香奈儿顶点如下,但我不断收到Redis的身份验证的PubSub在vertx
NOAUTH需要验证
下面是一个示例代码片段:我已经配置的Redis redis.conf中的密码
vertx.eventBus().<JsonObject>consumer(VERTX_EVENTBUS_PREFIX + ASYNC_RESPONSE_CHANNEL, message -> {
log.debug("Vertx event bus consumer invoked");
});
}).exceptionHandler(t -> {
log.error("Exception thrown from vertx event bus consumer", t);
});
// Subscribe to the redis async response channel
redis.subscribe(ASYNC_RESPONSE_CHANNEL, res -> {
if (res.failed()) {
log.error("Failed to subscribe to the async response channel. " + res.cause().getMessage());
}
if(res.succeeded()) {
log.debug("Subscribed to channel");
}
}).auth("redispasswd", null);
我找到了解决方案。我应该以不同的方式通过信条。我将编辑该问题以添加答案。 – Tharanga