提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.framework.websocket.core.sender.redis; |
H |
2 |
|
|
3 |
import com.iailab.framework.mq.redis.core.pubsub.AbstractRedisChannelMessageListener; |
|
4 |
import lombok.RequiredArgsConstructor; |
|
5 |
|
|
6 |
/** |
|
7 |
* {@link RedisWebSocketMessage} 广播消息的消费者,真正把消息发送出去 |
|
8 |
* |
|
9 |
* @author iailab |
|
10 |
*/ |
|
11 |
@RequiredArgsConstructor |
|
12 |
public class RedisWebSocketMessageConsumer extends AbstractRedisChannelMessageListener<RedisWebSocketMessage> { |
|
13 |
|
|
14 |
private final RedisWebSocketMessageSender redisWebSocketMessageSender; |
|
15 |
|
|
16 |
@Override |
|
17 |
public void onMessage(RedisWebSocketMessage message) { |
|
18 |
redisWebSocketMessageSender.send(message.getSessionId(), |
|
19 |
message.getUserType(), message.getUserId(), |
|
20 |
message.getMessageType(), message.getMessageContent()); |
|
21 |
} |
|
22 |
|
|
23 |
} |