Skip to content

Decoupled email service that uses a durable message queue and windows service for sending email

Notifications You must be signed in to change notification settings

derekkenney/Queue-demo-with-RabbitMQ-and-.NET

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The following source files are modified examples of a production project. The project was the decoupling of multiple websites using a common email service from a third party email provider.

I used RabbitMQ, and wrote a .NET Windows service application that uses the RabbitMQ extension library for .NET.

The following are the names of the example files, and a description of what each does

1. Producer.cs - reads user emails from website, and sends the message as an XML template to be stored in RabbitMQ queue.

2. QueueFactory.cs - a factory class responsible for creating instances of the RabbitMQ connection class. This factory initializes the object with connection and queue properties read from config files.

3. Consumer.cs - reads email messages from RabbitMQ to be sent to third party email service

4. EmailService.cs - a service class that creates an HTTP request, and sends the email message read by the consumer object to the third party email provider. Also responsible for receiving the response, and logging it to a log file.

5. Program.cs - a console worker application for reading from the queues, and sending emails. 

About

Decoupled email service that uses a durable message queue and windows service for sending email

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages