Asynchronous messaging pattern is a pattern that utilizes message queue.
Types
#1. Competing consumers

- Multiple consumers try to compete for the message from the queue.
- This would work well if the workload can be divided into independent tasks and where the tasks can be run asynchronously and in parallel
#2. Request/Response messaging

- Uses another queue that will be used as a callback
#3. Priority queue

- If each task has their own priority, the task queue can be a priority queue
- With native support, we can use just a single queue, but if it doesn’t support, we will need multiple queues per priority
#4. Clain check

- If the message itself is too large(like video, image, etc), we can
- Upload the large data(video file) to the shared storage like S3.
- Send only metadata and reference of the storage to the queue
- Or we may split the large data into small ones and merge from the consumer side.

Leave a comment