class DeserializationError implements ProcessingLogger.ErrorMessage {

  @Override
  public SchemaAndValue get(final ProcessingLogConfig config) {
    final Struct struct = new Struct(ProcessingLogMessageSchema.PROCESSING_LOG_SCHEMA)
        .put(ProcessingLogMessageSchema.TYPE, MessageType.DESERIALIZATION_ERROR.getTypeId())
        .put(ProcessingLogMessageSchema.DESERIALIZATION_ERROR, deserializationError(config));

    return new SchemaAndValue(ProcessingLogMessageSchema.PROCESSING_LOG_SCHEMA, struct);
  }

  public  DeserializationError(
      final Throwable exception,
      final Optional<byte[]> record,
      final String topic,
      final boolean isKey
  );

}