Protocol¶
SlackMQ's protocol is built entirely on Slack channels and emoji reactions. No custom API, no webhooks — just channels, messages, and emoji.
Topology Commands¶
All topology is managed via /smq slash commands:
/smq topic #channel — Register a channel as a topic
/smq subscribe #queue to #topic — Subscribe a queue to a topic
/smq dlq #dlq for #queue — Assign a dead-letter queue
/smq unsubscribe #queue from #topic — Remove a subscription
/smq untopic #channel — Stop watching a topic
/smq status — Show current topology
Emoji Protocol¶
The delivery lifecycle is driven entirely by emoji reactions:
| Emoji | Meaning | Applied By |
|---|---|---|
| :package: | Fan-out marker — message has been copied to subscriber queues | Broker |
| :eyes: | Claim — a consumer is looking at this message | Consumer |
| :lock: | Locked — broker confirms the claim, consumer may proceed | Broker |
| :thumbsup: | ACK — message successfully processed | Consumer |
| :thumbsdown: | NACK — consumer cannot process this message | Consumer |
| :repeat: | Redelivery — message is being retried | Broker |
| :skull: | Dead letter — message exhausted all retry attempts | Broker |
Delivery Lifecycle¶
1. Publisher posts message to topic channel
2. Broker detects message, adds :package:, copies to subscriber queues
3. Consumer adds :eyes: to claim a queue message
4. Broker adds :lock: to confirm the claim
5. Consumer processes the message
6. Consumer adds :thumbsup: (ACK) or :thumbsdown: (NACK)
7. On NACK: broker adds :repeat: and redelivers (up to max_attempts)
8. On final failure: broker adds :skull: and routes to DLQ (if configured)
Delivery Guarantees¶
- At-least-once: Default mode. Messages may be delivered more than once if a consumer crashes before ACKing.
- Exactly-once: Achievable when the broker and consumers share the same bot token (the broker can detect its own fan-out messages and skip re-processing).
Message Metadata¶
The broker tracks metadata per delivery:
- Source topic — which topic the message originated from
- Attempt count — current delivery attempt number (starts at 1)
- Original timestamp — the Slack message timestamp from the topic