System Admin Report
System Admin Report
Research
Message Queuing
Prepared by :
Hiran Bakhtyar
Helin Tahir
Gona Soran
Shniar Mariwan
Supervised by:
Dr. Zryan Rashid
1
Introduction
https://medium.com/@mosesbasseyekwere/message-queue-what-it-is-how-it-works-and-when-to-
use-it-2b7fb5dcef48
https://aws.amazon.com/message-queue/#:~:text=Message%20Queues&text=A%20message
%20queue%20is%20a,once%2C%20by%20a%20single%20consumer.
2
Benefits of Message Queuing
1. Better Performance: Message queues enable asynchronous
communication, which means that the endpoints that are producing and
consuming messages interact with the queue, not each other. Producers
can add requests to the queue without waiting for them to be processed.
Consumers process messages only when they are available. No component
in the system is ever stalled waiting for another, optimizing data flow.
2. Increased Reliability: Queues make your data persistent, and reduce the
errors that happen when different parts of your system go offline. By
separating different components with message queues, you create more
fault tolerance. If one part of the system is ever unreachable, the other can
still continue to interact with the queue. The queue itself can also be
mirrored for even more availability.
3. Granular Scalability: Message queues make it possible to scale precisely
where you need to. When workloads peak, multiple instances of your
application can all add requests to the queue without risk of collision. As
your queues get longer with these incoming requests, you can distribute
the workload across a fleet of consumers. Producers, consumers and the
queue itself can all grow and shrink on demand.
4. Simplifed Decoupling: Message queues remove dependencies between
components and significantly simplify the coding of decoupled
applications. Software components aren’t weighed down with
communications code and can instead be designed to perform a discrete
business function.
https://aws.amazon.com/message-queue/benefits/
3
Types of message queues :
4
How Message Queues Works?
5
Topology Designs in Message Queuing
These are some topology designs in message queuing System:
1. Point-To-Point Messaging
Point to Point means message(s) is sent from one application(producer/
sender) to another application(consumer/receiver) via a queue. There
can be more than one consumer listening on a queue but only one of
them will be ale to get the message. Hence, it is Point to Point or One to
One.
https://medium.com/tech-sauce/introduction-to-message-queuing-4a7ab8968b59
https://aws.amazon.com/what-is/dead-letter-queue/
https://dev.to/willvelida/the-priority-queue-pattern-23g8
6
What are the use cases of message queues?
Message queues are not for real-time communications. You can't use them
when you want an immediate response: for instance, in an HTTP request where
the end user shouldn’t wait for the response. In reality, message queues are
suitable for processes that aren't crucial.
Email communication
You can see an email queue as a buffer where the emails are stored before they
hit the endpoint. At the same time, the sender does not need to send each
message separately. The communication between the sender and the recipient is
asynchronous. Once the emails have been queued, they’re delivered step by
step. Usually, the Simple Mail Transfer Protocol (SMTP) server starts from the
beginning of the queue and goes forward.
7
Data post-processing
The second use case for message queues is data post-processing. Here’s an
example that can illustrate how message queues can help: Let’s say you have a
blog application that has to process image data from the images uploaded by
users. Since users can't offer web-optimized or suitable-sized images, adding a
post-process and resizing image function won't affect the application
functionality much. This isn't a critical operation and doesn’t require immediate
action. A service is employed in the application architecture that can optimize
images uploaded by the application. In this scenario, a message queue can help to
transmit messages between the application and service, facilitating image
optimization.
https://www.contrastsecurity.com/security-influencers/what-is-a-message-queue-
importance-use-cases-and-vulnerabilities-contrast-security
8
Conclusion
9
References
https://medium.com/@mosesbasseyekwere/message-queue-what-it-is-
how-it-works-and-when-to-use-it-2b7fb5dcef48
https://aws.amazon.com/message-queue/#:~:text=Message
%20Queues&text=A%20message%20queue%20is%20a,once%2C
%20by%20a%20single%20consumer.
https://aws.amazon.com/message-queue/benefits/
https://www.ibm.com/docs/en/i/7.3?topic=queues-types-message
https://www.geeksforgeeks.org/message-queues-system-design/#how-
message-queue-work
https://medium.com/tech-sauce/introduction-to-message-queuing-
4a7ab8968b59
https://aws.amazon.com/what-is/dead-letter-queue/
https://dev.to/willvelida/the-priority-queue-pattern-23g8
https://www.contrastsecurity.com/security-influencers/what-is-a-
message-queue-importance-use-cases-and-vulnerabilities-contrast-
security
10