Transaction
Transaction Service is a service written in Golang that stores all transactions and communicates with other services using RabbitMQ library. Its primary function is to manage transactions that occur within the system by recording them in a central location. The service is responsible for handling all incoming requests related to transactions, verifying their validity, and recording them in the system's database.
When a transaction is initiated, the Transaction Service receives the request, validates it, and stores the transaction data in the database. If the transaction involves other services, the Transaction Service will communicate with those services using RabbitMQ library to ensure that the transaction is completed successfully.
In addition to storing and managing transactions, the Transaction Service also receives messages from RabbitMQ. These messages may contain information related to a transaction, such as updates or cancellations. The service processes these messages and updates the transaction accordingly.
Overall, the Transaction Service plays a critical role in ensuring that all transactions within the system are handled accurately and efficiently. By recording and managing all transaction data in a central location, the service helps maintain the integrity of the system and ensures that transactions are completed successfully.
- Github repo: https://github.com/Pharmacity-JSC/pmc-ecm-service-transaction-api-golang
- Checkout our swagger: https://pmc-ecm-service-transaction-api-golang.dev.pharmacity.io/q/swagger-ui
1. Tech stacks
2. Data flow

3. Database Tables

Note:
- messages: Manage currently transactions in processing.
- messages_logs: Manage completed transactions.
- messages_details: Manage currently requests related to current transaction.
- messages_detail_logs: Manage completed requests related to transaction.
- error_logs: Logging error text when transaction failed.