Messaging Patterns
A learning track for messaging on KubeMQ — the fundamentals, the four patterns (Events, Events Store, Queues, RPC), then composing them into architectures.
KubeMQ is a single message broker that supports four distinct messaging patterns — from fire-and-forget broadcasting to reliable point-to-point delivery to synchronous request-reply. This section is a learning track, not just a reference: it starts with vendor-neutral fundamentals, shows how KubeMQ implements each pattern, helps you pick and combine them, then composes them into real architectures.
One broker, four patterns, every use case.
How to read this track
Work through it in order, or jump straight to the tier you need. Each step links to the next.
1 · Concepts
Start here. Vendor-neutral concepts — interaction styles, delivery guarantees, ordering & replay, scaling & flow, channels & routing — across 6 pages.
2 · The Four Patterns
How KubeMQ implements those concepts: Events, Events Store, Queues, and RPC.
3 · Choosing & Combining
An interactive decision guide to pick the right pattern, plus how to route to several at once.
New to messaging? Start with the Concepts — six short pages that explain the ideas every pattern is built on.
The Four Patterns
Events
Fire-and-forget pub/sub with at-most-once delivery. Fastest pattern, no persistence.
Events Store
Persistent pub/sub with replay from any point. Messages survive disconnections.
Queues
Point-to-point with guaranteed delivery, ack, DLQ, delay, and exactly-once processing.
RPC (Commands & Queries)
Synchronous request-reply. Commands for writes, Queries for reads.
The Four Patterns at a Glance
| Feature | Events | Events Store | Queues | RPC |
|---|---|---|---|---|
| Direction | Pub/Sub | Pub/Sub | Point-to-Point | Request-Reply |
| Persistence | No | Yes (disk) | Yes (disk) | No |
| Delivery guarantee | At-most-once | At-least-once | Exactly-once | At-most-once |
| Replay | No | Yes (6 positions) | No | No |
| Acknowledgment | No | No | Yes (manual) | Yes (automatic) |
| Ordering | No | Yes (sequence) | Yes (FIFO) | N/A |
| Response | No | No | No | Yes |
| Dead letter queue | No | No | Yes | No |
| Delayed delivery | No | No | Yes | No |
| Caching | No | No | No | Yes (queries) |
Which Pattern Should I Use?
Use the interactive decision guide to find the right pattern for your use case.
| If you need... | Use |
|---|---|
| Lowest latency, message loss acceptable | Events |
| Pub/sub with no message loss | Events Store |
| Replay historical messages | Events Store |
| One consumer per message, guaranteed delivery | Queues |
| Retry, DLQ, delayed delivery | Queues |
| Synchronous request-reply | RPC |
| Execute action, confirm success | RPC Commands |
| Request data, get result | RPC Queries |
Combining Patterns
Patterns can work together in a single application. KubeMQ's channel routing syntax lets you publish to multiple patterns simultaneously. Here are two common shapes.
Order pipeline: a command processes the order, emits an event to the durable log, which feeds a queue for reliable fulfillment.
CQRS shape: commands write through the event store, the read service subscribes to build its projection, and clients query that read side.
Channel routing syntax: use ; to separate channels and : to prefix the pattern type:
events:live-feed;events_store:archive;queues:processGet Started
Was this page helpful?