Lesson 1 - Event-Driven Architecture: Request/Reply Pattern
Tech1 of 2
Mark Richards on Asynchronous Responses
Mark Richards explains that while messaging is typically asynchronous, the request/reply pattern allows for a response to be received. This is achieved using two queues: a request queue for sending requests and a reply queue for receiving responses. This setup mimics synchronous behavior, allowing the sender to perform other tasks while waiting for a response, ultimately streamlining the process.
Temporary Queues Simplify Replies
Mark Richards introduces temporary queues as a simpler alternative to correlation IDs. The sender specifies a temporary queue in the message header, which the message broker creates exclusively for the response. Once the response is received, the queue is automatically removed. This approach eliminates the need for message selectors, streamlining the process and reducing complexity, thereby simplifying the architecture.
