Quick Start: How could you build a messaging solution with .Net Core? — Part 4

Ali Süleyman TOPUZ
3 min readFeb 1, 2021

--

  • How could you build a messaging solution with .Net Core Part 1
  • How could you build a messaging solution with .Net Core Part 2
  • How could you build a messaging solution with .Net Core Part 3
  • How could you build a messaging solution with .Net Core Part 4

In this part, we are going to see how to operates messages from senders to receivers. Handling the data in API, process and send to receiver by sender object. Besides, a base structure of receiver application will be shown.

Orders service

By authenticate API resource, token should be generated and used in Order related resource calls.

For understanding the general order flow:

RabbitMQ Service

Create Order

Create order request

It creates, and initialize the data as follows:

Assign a Shipper

Assign shipper request

And Email receiver sent the email:

Mail Trap message

Delivery In Progress

Delivery in progress request

Mail:

Delivered

Mail Trap test email

How is the sender mechanism?

Sending message to Receiver:

Let’s assume that we need to send message to receiver for created order.

Sender is as follows:

Sender

Queue name and host name are initialized and basic publish called with required parameters. Message is handled by receiver from specific queue.

A structure of Receiver service (Hosted service):

Message handles by receiver as follows. Start Async sets the required delegates and implementation is done in methods. Here, in the HandleMessage method, Order parameter is handled and processed as it is required.

Receiver

Github Repository

--

--

Ali Süleyman TOPUZ

Software Engineering and Development Professional. Writes about software development & tech. 📍🇹🇷