Complete xEventService ...
This commit is contained in:
@@ -74,6 +74,7 @@ namespace xEventService.Providers
|
||||
//
|
||||
// Subscribe to Topic ...
|
||||
consumer.Subscribe(topic);
|
||||
logger.LogInformation($"Kafka Cosume Topic: {topic} ...");
|
||||
|
||||
//
|
||||
// Consuming ...
|
||||
@@ -100,18 +101,22 @@ namespace xEventService.Providers
|
||||
{
|
||||
//
|
||||
await DoWorkAsync(
|
||||
payload: consumeResult.Message,
|
||||
payload: message,
|
||||
cancellationToken: cancellationToken
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ConsumeException)
|
||||
catch (ConsumeException ex)
|
||||
{
|
||||
//
|
||||
logger.LogError($"Kafka Consumer Result Parsing Error: {ex.Message} ...");
|
||||
await Task.Delay(1000, cancellationToken);
|
||||
}
|
||||
catch (Exception)
|
||||
catch (Exception ex)
|
||||
{
|
||||
//
|
||||
logger.LogError($"Kafka Consumer Result Parsing Error: {ex.Message} ...");
|
||||
await Task.Delay(1000, cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user