Browse Source

调整

master
杨雷 5 months ago
parent
commit
eaf86c0c20
1 changed files with 10 additions and 0 deletions
  1. +10
    -0
      TelpoPush.Position.Worker/Service/Mq/KafkaService.cs

+ 10
- 0
TelpoPush.Position.Worker/Service/Mq/KafkaService.cs View File

@@ -97,7 +97,17 @@ namespace TelpoPush.Position.Worker.Service.Mq
continue; continue;
} }
if (!string.IsNullOrEmpty(messageResult)) if (!string.IsNullOrEmpty(messageResult))
{
messageFunc(topic, messageResult, headers); messageFunc(topic, messageResult, headers);
try
{
consumer.Commit(consumeResult);
}
catch (KafkaException e)
{
logger.LogError($" - {e.Message}.");
}
}
#region 注释 #region 注释
//string messageResult = null; //string messageResult = null;
//Headers headers = null; //Headers headers = null;


Loading…
Cancel
Save