27 lines
838 B
C#
27 lines
838 B
C#
|
|
|
|||
|
|
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);
|
|||
|
|
}
|
|||
|
|
}
|
|||
|
|
}
|