杨雷 5 mesi fa
parent
commit
eaf86c0c20
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. +10
    -0
      TelpoPush.Position.Worker/Service/Mq/KafkaService.cs

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

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


Loading…
Annulla
Salva