初始化
This commit is contained in:
26
BLWLogProduce/Services/RoomStatusDataCollect.cs
Normal file
26
BLWLogProduce/Services/RoomStatusDataCollect.cs
Normal file
@@ -0,0 +1,26 @@
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user