package shop.alien.dining.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.Message;
import org.springframework.data.redis.connection.MessageListener;
import org.springframework.stereotype.Component;

/**
 * Redis键过期监听器
 *
 * @author ssk
 * @version 1.0
 * @date 2024/12/4
 */
@Slf4j
@Component
public class RedisKeyExpirationListener implements MessageListener {

    @Override
    public void onMessage(Message message, byte[] pattern) {
        String expiredKey = message.toString();
        log.info("Redis键过期: {}", expiredKey);
        // TODO: 实现键过期后的业务逻辑
    }
}

