package com.iailab.framework.websocket.core.sender.redis;
|
|
import com.iailab.framework.mq.redis.core.pubsub.AbstractRedisChannelMessageListener;
|
import lombok.RequiredArgsConstructor;
|
|
/**
|
* {@link RedisWebSocketMessage} 广播消息的消费者,真正把消息发送出去
|
*
|
* @author iailab
|
*/
|
@RequiredArgsConstructor
|
public class RedisWebSocketMessageConsumer extends AbstractRedisChannelMessageListener<RedisWebSocketMessage> {
|
|
private final RedisWebSocketMessageSender redisWebSocketMessageSender;
|
|
@Override
|
public void onMessage(RedisWebSocketMessage message) {
|
redisWebSocketMessageSender.send(message.getSessionId(),
|
message.getUserType(), message.getUserId(),
|
message.getMessageType(), message.getMessageContent());
|
}
|
|
}
|