Add support for redis password.
This commit is contained in:
parent
2614ba2cd0
commit
d8588da28a
@ -42,10 +42,9 @@ public class RedisStorageService extends RedisAwareCommunicator {
|
||||
public void start() {
|
||||
log.info("Starting RedisStorageService");
|
||||
RedisURI redisUri = RedisURI.Builder.redis(this.host, this.port).withClientName(this.clientName).build();
|
||||
// @todo Add password if provided
|
||||
// if (!this.password.isEmpty()) {
|
||||
// redisUri.setPassword(this.password);
|
||||
// }
|
||||
if (!this.password.isEmpty()) {
|
||||
redisUri.setPassword(this.password);
|
||||
}
|
||||
|
||||
redisClient = RedisClient.create(redisUri);
|
||||
redisClient.setOptions(ClientOptions.builder().autoReconnect(true).build());
|
||||
|
@ -28,8 +28,10 @@ public class MessageReceiver extends RedisAwareCommunicator {
|
||||
receiveMessage = true;
|
||||
|
||||
RedisURI redisUri = RedisURI.Builder.redis(this.host, this.port).withClientName(this.clientName).build();
|
||||
if (!this.password.isEmpty()) {
|
||||
redisUri.setPassword(this.password);
|
||||
}
|
||||
|
||||
// jedis.clientSetname("BbbRed5VideoSub");
|
||||
redisClient = RedisClient.create(redisUri);
|
||||
redisClient.setOptions(ClientOptions.builder().autoReconnect(true).build());
|
||||
connection = redisClient.connectPubSub();
|
||||
|
@ -47,10 +47,9 @@ public class MessageSender extends RedisAwareCommunicator {
|
||||
// CLIENT LIST on redis-cli // "BbbRed5VoicePub"
|
||||
|
||||
RedisURI redisUri = RedisURI.Builder.redis(this.host, this.port).withClientName(this.clientName).build();
|
||||
// @todo Add password if provided
|
||||
// if (!this.password.isEmpty()) {
|
||||
// redisUri.setPassword(this.password);
|
||||
// }
|
||||
if (!this.password.isEmpty()) {
|
||||
redisUri.setPassword(this.password);
|
||||
}
|
||||
|
||||
redisClient = RedisClient.create(redisUri);
|
||||
redisClient.setOptions(ClientOptions.builder().autoReconnect(true).build());
|
||||
|
@ -26,8 +26,6 @@ class BbbWebApiGWApp(
|
||||
|
||||
val log = Logging(system, getClass)
|
||||
|
||||
log.debug("*********** meetingManagerChannel = " + meetingManagerChannel)
|
||||
|
||||
private val jsonMsgToAkkaAppsBus = new JsonMsgToAkkaAppsBus
|
||||
private val redisPublisher = new RedisPublisher(system, "BbbWebPub")
|
||||
private val msgSender: MessageSender = new MessageSender(redisPublisher)
|
||||
|
@ -8,7 +8,6 @@ import org.bigbluebutton.common2.redis.RedisConfiguration
|
||||
trait SystemConfiguration extends RedisConfiguration {
|
||||
override val config = ConfigFactory.load("bbb-web")
|
||||
|
||||
lazy val meetingManagerChannel = Try(config.getString("eventBus.meetingManagerChannel")).getOrElse("FOOOOOOOOO")
|
||||
lazy val fromAkkaAppsChannel = Try(config.getString("eventBus.fromAkkaAppsChannel")).getOrElse("from-akka-apps-channel")
|
||||
lazy val toAkkaAppsChannel = Try(config.getString("eventBus.toAkkaAppsChannel")).getOrElse("to-akka-apps-channel")
|
||||
lazy val fromClientChannel = Try(config.getString("eventBus.fromClientChannel")).getOrElse("from-client-channel")
|
||||
|
@ -32,7 +32,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
init-method="start" destroy-method="stop">
|
||||
<property name="host" value="${redis.host}" />
|
||||
<property name="port" value="${redis.port}" />
|
||||
<property name="password" value="${redis.password:''}" />
|
||||
<property name="password" value="${redis.password:}" />
|
||||
<property name="clientName" value="BbbScreenshare" />
|
||||
</bean>
|
||||
</beans>
|
||||
|
@ -41,7 +41,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
init-method="start" destroy-method="stop">
|
||||
<property name="host" value="${redis.host}" />
|
||||
<property name="port" value="${redis.port}" />
|
||||
<property name="password" value="${redis.password:''}" />
|
||||
<property name="password" value="${redis.password:}" />
|
||||
<property name="expireKey" value="${redis.keyExpiry}" />
|
||||
<property name="clientName" value="BbbRed5VideoStore" />
|
||||
</bean>
|
||||
@ -50,7 +50,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
init-method="start" destroy-method="stop">
|
||||
<property name="host" value="${redis.host}" />
|
||||
<property name="port" value="${redis.port}" />
|
||||
<property name="password" value="${redis.password:''}" />
|
||||
<property name="password" value="${redis.password:}" />
|
||||
<property name="clientName" value="BbbRed5VideoReceiver" />
|
||||
<property name="messageHandler" ref="receivedMessageHandler"/>
|
||||
</bean>
|
||||
@ -60,7 +60,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<property name="host" value="${redis.host}" />
|
||||
<property name="port" value="${redis.port}" />
|
||||
<property name="clientName" value="BbbRed5VideoSender" />
|
||||
<property name="password" value="${redis.password:''}" />
|
||||
<property name="password" value="${redis.password:}" />
|
||||
</bean>
|
||||
|
||||
<bean id="redisPublisher" class="org.bigbluebutton.red5.pubsub.MessagePublisher">
|
||||
|
@ -46,7 +46,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
<property name="host" value="${redis.host}"/>
|
||||
<property name="port" value="${redis.port}"/>
|
||||
<property name="clientName" value="BbbRed5VoiceSender" />
|
||||
<property name="password" value="${redis.password:''}" />
|
||||
<property name="password" value="${redis.password:}" />
|
||||
</bean>
|
||||
|
||||
<bean id="messagingService" class="org.bigbluebutton.voiceconf.messaging.RedisMessagingService">
|
||||
@ -61,7 +61,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
init-method="start" destroy-method="stop">
|
||||
<property name="host" value="${redis.host}"/>
|
||||
<property name="port" value="${redis.port}"/>
|
||||
<property name="password" value="${redis.password:''}" />
|
||||
<property name="password" value="${redis.password:}" />
|
||||
<property name="clientName" value="BbbRed5VideoReceiver" />
|
||||
<property name="messageHandler"> <ref local="redisMessageHandler"/> </property>
|
||||
</bean>
|
||||
|
@ -32,7 +32,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
init-method="start" destroy-method="stop">
|
||||
<property name="host" value="${redisHost}" />
|
||||
<property name="port" value="${redisPort}" />
|
||||
<property name="password" value="${redisPassword:''}" />
|
||||
<property name="password" value="${redisPassword:}" />
|
||||
<property name="clientName" value="BbbWeb" />
|
||||
</bean>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user