The common messaging patterns, one page each, with a real case for each one: the problem, the pattern that solves it with QueenMQ, and the code in the six languages of the SDKs. Every result quoted on these pages comes from programs that run the code and check it, one per language (book-use-cases under examples/tutorials/).
| Pattern | The case |
|---|---|
| Work queue | Photos resized by three workers, each photo once. |
| Publish/subscribe | One order read by billing, shipping and analytics. |
| Request and reply | A price from the pricing service, or “ask us” after half a second. |
| Ordering and batching | A burst of chat messages handled in order, in one call. |
| Workflows | An order moving from paid to shipped, one transaction per step. |
| Windowed aggregation | The spans of a trace merged into one record when the trace goes quiet. |
| Rate limiting | SMS sent at most five a second per customer, in order. |
| Last value | Room availability, where only the newest update matters. |
| Delayed messages | A review request a day after checkout, moved or cancelled. |
| Retries and dead letters | Webhooks retried with a delay, and filed when they never succeed. |
| One worker at a time | A nightly report that runs once, on one of three replicas. |
Why
most applications are a few of these patterns put together. Seeing each one alone, with its trap, makes the combination easy to read.