MENU

Fun & Interesting

Was that message processed? Asynchronous Request-Response Pattern

CodeOpinion 12,486 3 years ago
Video Not Working? Fix It Now

What's the request-response pattern for? We're used to synchronous communication. You make a request to another service and get a response. When you move to asynchronous communication, you often think of messages as fire-and-forget. You send a command to a queue, and the consumer handles it asynchronously. Because of the temporal decoupling, you don't know when the message was processed or what the result was. However, there is a solution! Let me explain how you can use the request-response pattern to reply sender once a message is processed. ? EventStoreDB https://eventsto.re/codeopinion ? Subscribe: https://www.youtube.com/channel/UC3RKA4vunFAfrfxiJhPEplw?sub_confirmation=1 ? Join this channel to get access to source code & demos! https://www.youtube.com/channel/UC3RKA4vunFAfrfxiJhPEplw/join ? Don't have the JOIN button? Support me on Patreon! https://www.patreon.com/codeopinion ? Blog: https://codeopinion.com ? Twitter: https://twitter.com/codeopinion ✨ LinkedIn: https://www.linkedin.com/in/dcomartin/ ? Weekly Updates: https://mailchi.mp/63c7a0b3ff38/codeopinion 0:00 Intro 0:45 Synchronous Request-Response 2:24 Asynchronous Request-Response 4:53 Code Example #softwarearchitecture #eventdrivenarchitecture #messagedrivenarchitecture

Comment