Sample project that is used for specific data extraction from files. Project contains two microservices.
- DocumentService - receives files and stores data
- ProcessingService - processes files received from DocumentService and sends information back.
Communication between services is done via RabbitMq.
- POST: /documents/upload Receives multiple files
- GET /documents/{documentId}
- Document service collects files via POST endpoint, checks validity and stores locally files, saves path to file in database(along with status of processing) and sends a message with file path to the processing queue.
- Processing service listens for the messages on processing queue. When message arrives, Processing Service will check the file path from the message, collect the file and process it (extract data like: price, tax, item id, etc, word is of dummy data)
- Processing service sends successfully processed data to the completed queue. In case of process fail, message will be sent to failed queue. In case of inability to read a message, processing service will forward it to dead queue.
- Document Service listens to the completed and failed queue. Based from which queue message appears, Document Service will update existing document in database.
Example of supported files and files that contain valid data, can be found in this directory.
- Install docker
- Check out repository
- Navigate to project folder and run:
docker compose up