Clik on Add a new queue bellow the table with all queues
Create three new queues with the following configuration
Name: log_order
Durabillity: Durable
Auto delete: No
Arguments: Leave it empty
Name: error_order
Durabillity: Durable
Auto delete: No
Arguments: Leave it empty
Name: email_order
Durabillity: Durable
Auto delete: No
Arguments: x-dead-letter-exchange = sale_order_dead_letter, x-dead-letter-routing-key = email_order
Exchange Configuration
Go to Exchanges Tab on RabbitMQ
Clik on Add a new Exchange bellow the table with all exchanges
Create two new Exchanges named SaleOrder and sale_order_dead_letter both with Type: topic | Durabillity: Durable | Auto delete: No | Internal: No and let Arguments empty
Remember these configurations are default for the project, if you wish to change the names remember to adapt the project to them on the following steps!
Click on the new Exchange named SaleOrder
Inside SaleOrder click on Bindings
Create two new Bidings:
To queue: email_order
Routing Key: order
Arguments: Leave it empty
To queue: log_order
Routing Key: order
Arguments: Leave it empty
Now go back to Exchanges and go to sale_order_dead_letter exchange
Create a new Biding:
To queue: error_order
Routing Key: email_order
Arguments: Leave it empty
Running Project
Open your visual studio and open SaleOrder.RabbitMq.sln
Wait until Visual Studio install all dependencies
Right click on Solution 'SaleOrder.RabbitMq' -> Properties (or Alt + Enter)
Expand the Common Properties node and choose Startup Project.
Choose the Multiple Startup Projects option.
Mark SaleOrder.RabbitMq.Email, SaleOrder.RabbitMq.Error, SaleOrder.RabbitMq.Log, SaleOrder.RabbitMq.Order as "Start".
Run the project -> Ctrl + F5 or F5 to debug
Wait Visual Studio to compile the project
The project should be running without problems.
Editing default project variables
Go to file ConfigurationRepository.cs inside SaleOrder.RabbitMq.Infra\Repository
Change Exchange to your new name (Remember this must be the same name as the Exchange you created before on RabbitMQ!)
Change the return string for each type inside GetRoutingKey method (Remember this must be the same name as the Queues/Routing Keys you created before on RabbitMQ).