File Ingestion Notifications

Overview

The file processing is triggered via a Kafka notification and the following two integration points are the key for processing:

  • File available - When file is available for processing then the bank system uploading the file MUST send a Kafka notification to reachability. This is processed by the file ingester connector, notifying that a file is available for processing in an S3 bucket.

  • File processed - When file is finished being processed a File Processed Notification message is sent to File Processed topic (if sendAcknowledgement requested), notifying bank system that the file has finished processing (with a clear indication of the status)

Notification format and mapping errors to OutcomeDescription

Currently, there are 2 types of notifications:

  • File Available Notification message - Notifying the reachability file ingester that a file is available for processing

  • File Processed Notification message - Notifying the bank system that a files processing has been finished (with a clear indication of the status)

Format of notifications is next:

Notification format for File Available Notification message

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "requestId": {
      "type": "string",
      "description": "A unique identifier of the notification request"
    },
    "fileProvider": {
      "type": "string",
      "description": "Indicates which File Operations Adapter to use, e.g. S3, EFC"
    },
    "filePath": {
      "type": "string",
      "description": "The absolute path of the file, for S3 should be S3 URL, see https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html#API_GetObject_RequestSyntax"
    },
    "fileName": {
      "type": "string",
      "description": "The name of the file, must always begin with the file type, e.g. BANKDIRECTORYPLUS_V3_FULL_foo_bar.xml"
    },
    "uploadedAt": {
      "type": "string",
      "format": "date-time",
      "description": "A timestamp indicating when the file has been uploaded"
    },
    "sendAcknowledgment": {
      "type": "boolean",
      "description": "Whether an acknowledgment of file processing needs to be sent back"
    }
  },
  "required": [
    "requestId",
    "fileProvider",
    "filePath",
    "fileName",
    "uploadedAt",
    "sendAcknowledgment"
  ]
}

Notification format for File Processed Notification message

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "requestId": {
      "type": "string",
      "description": "A unique identifier of the notification request being acknowledged"
    },
    "fileProvider": {
      "type": "string",
      "description": "Copied from input"
    },
    "filePath": {
      "type": "string",
      "description": "Copied from input"
    },
    "fileName": {
      "type": "string",
      "description": "Copied from input"
    },
    "processingFinishedAt": {
      "type": "string",
      "format": "date-time",
      "description": "A timestamp indicating when the file has finished processing"
    },
    "outcomeCode": {
      "type": "string",
      "description": "A code describing the outcome, list TBD"
    },
    "outcomeDescription": {
      "type": "string",
      "description": "A textual description of the code"
    }
  },
  "required": [
    "requestId",
    "fileProvider",
    "filePath",
    "fileName",
    "processingFinishedAt",
    "outcomeCode",
    "outcomeDescription"
  ]
}

When outcomeCode is SUCCESS outcome description is Success and when outcomeCode is FAILED then outcomeDescription is exception message explaining the error that occurred.

Acknowledgement

When File Available Notification message is received, within the message there is a boolean sendAcknowledgement.The File Processed Notification message will or will not be sent based on that value after file processing is done.