EventProcessor class that processes events from an SQS queue.

Type Parameters

  • ResponseInnerType

    The type of the inner response object.

Constructors

Methods

Constructors

  • Constructs a new instance of the class.

    Type Parameters

    • ResponseInnerType

    Parameters

    • event: SQSEvent

      The event object representing the incoming SQS message.

    • context: Context

      The context object representing the AWS Lambda execution context.

    • Optionalconfig: TransactionConfig

      Optional configuration object for the transaction.

    • OptionalallowFailure: boolean

      Optional flag indicating whether to allow failure for the transaction.

    Returns default<ResponseInnerType>

    None

Methods

  • Processes an event using the provided execution object and returns a response.

    Parameters

    Returns Promise<null | default<null | ResponseErrorType> | SQSBatchResponse>

    • A promise that resolves to the response object, or null if no response is available.
    • Throws an error if the response code is not within the range of 200 to 299 and failure is not allowed.