Consumers
A consumer is a client that receives messages from FlowMQ.
Consumers receive messages from destinations such as streams, queues, or subscriptions.
Consumer Types
| Destination | Consumer behavior |
|---|---|
| Stream | Reads from a durable log and tracks position with offsets |
| Queue | Receives queued messages and acknowledges them after processing |
| Subscription | Receives real-time fan-out messages while active |
Choosing a Consumer Type
Use a stream consumer when the application needs replay, retention, or independent consumer groups.
Use a queue consumer when messages should wait in a queue until they are processed, and each message should be handled by one consumer.
Use a subscription consumer when active clients need low-latency fan-out and do not need messages retained while they are offline.
Failure Handling
Failure behavior depends on the destination.
- Stream consumers resume from a stored offset.
- Queue consumers acknowledge messages after processing. Unacknowledged messages can be delivered again.
- Subscription consumers receive messages while active. If a consumer disconnects, its subscription is removed and messages are not retained unless another durable path is configured.