/ ARCHITECTURE

Asynchronous Messaging Pattern

Intro

Message queue provides "Asynchronous communication protocol". That means it is not necessary for sender and receiver to be connected at the same time. It can make application scalable and flexible.

Feature and benefits[1]

  • There are no direct connections between programs.
  • Communication between programs can be independent of time.
  • Work can be carried out by small, self-contained programs.
  • Communication can be driven by events.
  • Applications can assign a priority to a message.
  • Security.
  • Data integrity.
  • Recovery support.

Basic Message Queuing Patterns[2]

  1. One-way messaging
    • General pattern of messaging queue. Sender just posts a meesage and receiver just retrieve it to process some logic.
    • Reference Architecture(azure)[3]
    • Test Image

      - improving scalability and performance in an Azure App Service web application
      - Go to the link [3]. We can use deployment script generating azure resource and application code on github reposipory.

    • Self practice
  2. Request/response messaging
    • Sender posts a message to a queue and wait for a response from the receiver
    • Confirming whether messages have been proccessed(reliablity)
    • Need to separate communication channel as queue
    • Test Image
    • Self practice
  3. Broadcast messaging
    • sender posts a message to a queue, and multiple receivers can read a copy
    • It is used to implement a publisher/subscriber model
    • Reference Architecture(azure)[4]
    • Test Image

      - Asynchronous communication using a message broker
      - An application or service can publish events, and any interested subscribers will be notified.

    • Self practice

  1. reference: https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_7.5.0/com.ibm.mq.pro.doc/q002630_.htm ↩︎
  2. reference: https://docs.microsoft.com/en-us/previous-versions/msp-n-p/dn589781(v=pandp.10)?redirectedfrom=MSDN ↩︎
  3. reference: https://docs.microsoft.com/ko-kr/azure/architecture/reference-architectures/app-service-web-app/scalable-web-app ↩︎
  4. reference: https://docs.microsoft.com/en-us/azure/architecture/reference-architectures/enterprise-integration/queues-events ↩︎