Просмотр исходного кода

去掉 消息推送和 即时通讯服务线程

anderx лет назад: 7
Родитель
Сommit
d14f520293

+ 3 - 2
src/main/java/com/goafanti/easemob/queue/EasemobRedisQueue.java

@@ -42,7 +42,8 @@ public class EasemobRedisQueue implements InitializingBean, DisposableBean {
 
 	@Override
 	public void afterPropertiesSet() throws Exception {
-		factory = redisTemplate.getConnectionFactory();
+		// do nothing
+		/*factory = redisTemplate.getConnectionFactory();
 		connection = RedisConnectionUtils.getConnection(factory);
 
 		listOperations = redisTemplate.boundListOps(key);
@@ -50,7 +51,7 @@ public class EasemobRedisQueue implements InitializingBean, DisposableBean {
 			listenerThread = new ListenerThread();
 			listenerThread.setDaemon(true);
 			listenerThread.start();
-		}
+		}*/
 	}
 
 	/**

+ 5 - 2
src/main/java/com/goafanti/message/queue/MessageRedisQueue.java

@@ -42,15 +42,17 @@ public class MessageRedisQueue implements InitializingBean, DisposableBean {
 
 	@Override
 	public void afterPropertiesSet() throws Exception {
-		factory = redisTemplate.getConnectionFactory();
+		//do nothing
+		/*factory = redisTemplate.getConnectionFactory();
 		connection = RedisConnectionUtils.getConnection(factory);
 
 		listOperations = redisTemplate.boundListOps(key);
 		if (listener != null) {
 			listenerThread = new ListenerThread();
+			listenerThread.setName("message thread");
 			listenerThread.setDaemon(true);
 			listenerThread.start();
-		}
+		}*/
 	}
 
 	/**
@@ -130,6 +132,7 @@ public class MessageRedisQueue implements InitializingBean, DisposableBean {
 	}
 
 	private class ListenerThread extends Thread {
+
 		@Override
 		public void run() {
 			try {