Kafka: fixed onmessage error
This commit is contained in:
parent
20a9d01dd4
commit
647a7fb2d4
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user