Kafka: fixed onmessage error

This commit is contained in:
pavelbannov 2019-09-26 14:53:54 +03:00
parent 20a9d01dd4
commit 647a7fb2d4

View File

@ -125,7 +125,14 @@ namespace ASC.Common.Caching
var cr = c.Consume(Cts[channelName].Token);
if (cr != null && cr.Value != null && !(new Guid(cr.Key.Id.ToByteArray())).Equals(Key) && Actions.TryGetValue(channelName, out var act))
{
act(cr.Value);
try
{
act(cr.Value);
}
catch (Exception e)
{
Log.Error("Kafka onmessage", e);
}
}
}
catch (ConsumeException e)