This is a .NET 8 project that provides a WorkerService for consume messages from a queue. The project is written in C# and uses several technologies and frameworks.
- .NET 8: The latest version of the .NET framework, used for building high-performance, cross-platform applications.
- C#: The primary programming language used in this project.
- .NET Core: A framework for building .net applications.
- Entity Framework Core: An object-relational mapper (ORM) that simplifies data access by letting you work with relational data using domain-specific objects.
- PostgreSQL: The database used for persisting data.
- Prometheus: is an open-source systems monitoring and alerting toolkit, used to get metrics about the app.
src/Fiap.TechChallenge.Domain
: This project contains the domain entities and repositories interfaces.src/Fiap.TechChallenge.Application
: This project contains the application services and DTOs.src/Fiap.TechChallenge.Worker
: This project is the workerService layer that consumes messages from queue.src/Fiap.TechChallenge.Infrastructue
: This project contains the implementation of the repositories and the database context.tests/Fiap.TechChallenge.UnitTests
: This project contains the unit tests for the application services.
- Clone the repository.
- Ensure rabbitMQ and PostgresDb is running on your machine.
- Navigate to the root directory.
- Ensure Docker is installed and up on your machine.
- Run command
docker-compose up -d
in the terminal - The worker will start to listen the queue on rabbitMq.
- Clone the repository.
- Ensure rabbitMQ and PostgresDb is running on your machine.
- Navigate to the
src/Fiap.TechChallenge.Worker
directory. - Run
dotnet restore
to restore the NuGet packages. - Update the connection string in the
launchSettings.json
file. - Run
dotnet run
to start the application.
- Ensure Docker is installed and up on your machine.
- Ensure rabbitMQ and PostgresDb is running on your machine.
- Navigate to the root directory.
- Run
docker build -t tech-challenge-delete .
to start the application. - Run
docker run --name tech-challenge-delete -p 8081:80 -d tech-challenge-delete
to start the container. - The worker will start to listen the queue on rabbitMq.
- Navigate to the
src/Fiap.TechChallenge.UnitTests
directory. - Run
dotnet test
to run the tests. - The test results will be displayed in the console.
contact-delete-queue
: Consume message wich is a representation of a contact and insert it in postgres Db.
This project is licensed under the MIT License - see the LICENSE file for details.