
using Common;
using CommonEntity;
using Confluent.Kafka;
using static CSRedis.CSRedisClient;

namespace BLWLogProduce.Services
{
    public class RoomStatusDataCollect : BackgroundService
    {
        protected override async Task ExecuteAsync(CancellationToken stoppingToken)
        {
            await Task.Factory.StartNew((State) =>
            {
                var DingYue = ("redis-udppackage-roomstatus-takecardstatus", new Action<SubscribeMessageEventArgs>((args) =>
                {
                    string body = args.Body;
                    string TopicKey = KafkaKey.BLWLog_RCU_Topic;
                    string DetailKey = KafkaKey.UDPPackageKey;
                }));
                CSRedisCacheHelper.redis.Subscribe(DingYue);

            }, TaskCreationOptions.LongRunning, stoppingToken);
        }
    }
}
