Before you beginYou need the cluck CLI, a Pollosoft account, and a coop to work in. This guide assumes you are comfortable with the basics. If you are not, start with Getting started.
Overview
Decouple services with queues, topics, and a healthy respect for ordering. The whole thing takes about 16 minutes, and the commands below are the ones you will use along the way.
$ cluck feed queue create orders
$ cluck feed queue subscribe orders --to worker
$ cluck feed queue stats orders
Steps
- Choose queues or topics. Use a queue when one consumer should handle each message, and a topic when many should.
- Handle duplicates. Delivery is at-least-once, so make handlers idempotent. Use the message ID as a key.
- Dead letters. After five failures, a message moves to the dead-letter queue. Review it daily and fix the cause.
- Scale consumers. Add workers until the backlog drains. Autoscaling on queue depth keeps your hens fed.
Commands used
Keep going
- Accessibility at the coop (10 min)
- Webhooks: listening for the dawn (9 min)
- Building dashboards in Yolkboard (9 min)
Stuck? Check the error codes, the FAQ, or the glossary.