in src/Epam.Kafka.PubSub.EntityFrameworkCore/Publication/Contracts/DbContextEntityPublicationHandler.cs [118:141]
protected sealed override void Callback(TEntity entity, IReadOnlyCollection<DeliveryReport> reports,
DateTimeOffset? transactionEnd)
{
if (entity == null)
{
throw new ArgumentNullException(nameof(entity));
}
if (reports == null)
{
throw new ArgumentNullException(nameof(reports));
}
DeliveryReport? error = reports.FirstOrDefault(x => x.Error.IsError);
if (error != null)
{
this.ErrorCallback(entity, error);
}
else
{
this.SuccessCallback(entity, reports, transactionEnd);
}
}