Skip to content

lucaslab-dev/PrinterSolution

Repository files navigation

PrinterSolution

 

PrinterSolution

Github top language Github language count Repository size License Github issues Github forks Github stars

About   |   Features   |   Technologies   |   Requirements   |   Starting   |   License   |   Author


🎯 About

PrinterSolution is a distributed printing simulation system that demonstrates the integration between a Web API and a Console Application using RabbitMQ as a message broker. The system allows sending print commands through a REST API endpoint, which are then processed by a console application that simulates a remote printer.

✨ Features

✔️ REST API for receiving print requests;
✔️ Message queuing with RabbitMQ for reliable message delivery;
✔️ Console-based printer simulation;
✔️ Asynchronous message processing;
✔️ Scalable architecture for multiple printer support

🚀 Technologies

The following tools were used in this project:

💻 Architecture

The architecture of the PrinterSolution system consists of the following components:

  • Web API: The Web API is responsible for receiving print requests through a REST API endpoint. It sends the print commands to the message queue using RabbitMQ.
  • Console Printer App: The Console Printer App is responsible for processing print commands received from the message queue. It simulates a remote printer by printing the received messages.

The communication between the Web API and the Console Printer App is facilitated by RabbitMQ, a message broker. The Web API sends print commands to the message queue, and the Console Printer App consumes the messages from the queue.

Architecture Diagram

✅ Requirements

Before starting 🏁, you need to have the following installed:

🏁 Starting

# Clone this project
$ git clone https://github.com/lucaslab-dev/printersolution

# Access
$ cd printersolution

# Start RabbitMQ container
$ docker run -d --hostname my-rabbit --name some-rabbit \
  -p 5672:5672 -p 15672:15672 \
  -v rabbitmq_data:/var/lib/rabbitmq \
  rabbitmq:3-management

# Run the Web API (in one terminal)
$ cd WebAPI
$ dotnet run

# Run the Console Printer App (in another terminal)
$ cd PrinterConsole
$ dotnet run

# The Web API will be available at <http://localhost:5000>
# Swagger documentation can be accessed at <http://localhost:5000/swagger>
# RabbitMQ management interface will be at <http://localhost:15672>

📝 License

This project is under license from MIT. For more details, see the LICENSE file.

Made with ❤️ by Lucas Lab

 

Back to top

About

Solution for sending messages from Web API to Console App through Rabbit MQ

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages