websocket 整合
This commit is contained in:
@@ -164,9 +164,11 @@ sms:
|
||||
territory: ap-guangzhou
|
||||
spring:
|
||||
rabbitmq:
|
||||
addresses: 127.0.0.1 #ip地址
|
||||
addresses: 124.222.254.188 #ip地址
|
||||
username: admin # 账号
|
||||
password: admin # 密码
|
||||
password: 383200134 # 密码
|
||||
port: 5672
|
||||
virtual-host: /cai
|
||||
agora:
|
||||
app-id: app
|
||||
key: key
|
||||
|
||||
@@ -4,6 +4,8 @@ import org.springframework.amqp.core.*;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
|
||||
@Configuration
|
||||
public class CheckTimeOutMqConfig {
|
||||
@@ -14,10 +16,13 @@ public class CheckTimeOutMqConfig {
|
||||
|
||||
@Bean
|
||||
public CustomExchange delayedExchange() {
|
||||
HashMap<String,Object> args = new HashMap<>();
|
||||
args.put("x-delayed-type", "direct");
|
||||
return new CustomExchange(EXCHANGE_NAME,
|
||||
"x-delayed-message", // 消息类型
|
||||
true, // 是否持久化
|
||||
false); // 是否自动删除
|
||||
false,// 是否自动删除
|
||||
args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
@@ -29,7 +34,7 @@ public class CheckTimeOutMqConfig {
|
||||
|
||||
@Bean
|
||||
public Binding delayedBinding(Queue delayedQueue,CustomExchange delayedExchange) {
|
||||
return BindingBuilder.bind(delayedQueue).to(delayedExchange).with(ROUTING_KEY).noargs();
|
||||
return BindingBuilder.bind(delayedQueue()).to(delayedExchange()).with(ROUTING_KEY).noargs();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.stereotype.Component;
|
||||
/**
|
||||
* 被叫方拒绝通话
|
||||
*/
|
||||
@Component("cancalltime")
|
||||
@Component("refuse")
|
||||
public class RefuseMessageHandler extends AbstractMessageHandle implements IMessageHandler {
|
||||
@Autowired
|
||||
private RoomDataCache roomDataCache;
|
||||
|
||||
Reference in New Issue
Block a user