example-bank-celery

openg2p-g2p-bridge-example-bank-celery

This is a celery based microservice. This microservice has the following

  1. A celery beat producer - process_payments_beat_producer - that picks up all "PENDING" initiate_payment_batch_requests and delegates the batch_id to a celery worker

  2. A celery worker - process_payments_worker - that receives the batch_id from the beat producer.

    1. It then picks up all the individual payments for that batch_id and creates book keeping entries for the remitter side (debit leg) for every payment

    2. Since this is only a simulator, it only generates the Debit leg of the book keeping (for the remitter account) and does not bother about the Credit leg (the beneficiary part) of the book keeping

    3. It updates the account.book_balance and account.available_balance accordingly for each payment

    4. It also randomly produces some reversal entries for every payment transaction

  3. A celery worker - account_statement_generator - that receives account_statement.id from the generate_statement controller API

    1. It generates an MT940 account statement for that account and persists that statement (as a TEXT) in account_statement.lob

Last updated

Logo

Copyright © OpenG2P. This work is licensed under Creative Common Attribution (CC-BY-4.0) International license unless otherwise noted.