Explorar el Código

Fixed kafka producer exception log without logging when publish message.

undefined
Savorboard hace 6 años
padre
commit
c9f672e08b
Se han modificado 2 ficheros con 2 adiciones y 7 borrados
  1. +2
    -6
      src/DotNetCore.CAP.Kafka/IPublishMessageSender.Kafka.cs
  2. +0
    -1
      src/DotNetCore.CAP/Infrastructure/Helper.cs

+ 2
- 6
src/DotNetCore.CAP.Kafka/IPublishMessageSender.Kafka.cs Ver fichero

@@ -36,11 +36,7 @@ namespace DotNetCore.CAP.Kafka

if (message.Error.HasError)
{
return OperateResult.Failed(new OperateError
{
Code = message.Error.Code.ToString(),
Description = message.Error.Reason
});
throw new PublisherSentFailedException(message.Error.ToString());
}

_logger.LogDebug($"kafka topic message [{keyName}] has been published.");
@@ -61,6 +57,6 @@ namespace DotNetCore.CAP.Kafka
producer.Dispose();
}
}
}
}
}
}

+ 0
- 1
src/DotNetCore.CAP/Infrastructure/Helper.cs Ver fichero

@@ -86,7 +86,6 @@ namespace DotNetCore.CAP.Infrastructure
return !CanConvertFromString(type);
}


public static string AddExceptionProperty(string json, Exception exception)
{
var jObject = ToJObject(exception);


Cargando…
Cancelar
Guardar