The 08:00 queue check: turn a person’s morning habit into an alert, and give the data owners their own view

Somewhere in your integration team there is a person whose first task every morning is opening the broker console, looking at the dead-letter queue, and deciding whether today is going to be a bad day.

Nobody wrote it down as a job. It started when one flow went live and someone said, “I’ll just have a look each morning.” It was a perfectly reasonable thing to say. It is now year four, the person has changed twice, and the check survives the way all unwritten rituals do: because the one time it was skipped, something went wrong.

We like these rituals. They are a sign that someone cares. They are also a sign that a system is missing.

What the ritual is really doing

Look at what the morning check actually involves:

  1. Open the console.
  2. Find the right queue among forty others.
  3. Compare the number to a feeling about what is normal.
  4. If it looks wrong, tell someone. Usually the person who published the data, who then asks “so did my orders go through?”

Steps one to three are a lookup a system can do. Step four is the real value, and it is the part that gets lost when the person is on holiday.

Step 1: give the queue to an integration

In Sluicio the unit is the integration, not the service or the broker. We take the Orders integration, which already groups the services behind it, and add the queue as a metric source. A queue on a shared broker does not belong to any one service, so the integration’s Metrics tab lets you add it as a source, filtered to one destination: here, messaging.destination.name = order-api.inbound.

The result is small but important. The queue depth now lives on the integration it belongs to, next to its traffic, failures and delays, instead of in a console that nobody maps to a business flow.

(Orders, Metrics tab, queue source and `queue.depth`)

Step 2: replace the feeling with a threshold

The person in our story compares the number to a feeling. A rule can compare it to a number.

We looked at what normal is: this queue averages around 100 messages and wanders a little. A rule on the maximum would fire on every routine blip, so we use the average over five minutes, and alert above 150. We also tick one more box: alert if the metric stops reporting. A queue that goes silent is as interesting as a queue that fills up, and it is the same absence problem as in the earlier post about monitoring things that did not happen.

(the rule: avg of queue.depth gt 150 for 5m - also alert if this metric stops reporting)

For a real dead-letter queue the logic is simpler still: point the source at the DLQ and alert on “above zero”. The ritual becomes one line.

Step 3: tell the person who can do something

An alert that goes to the on-call engineer at 08:05 is better than a ritual, but only a little. On-call can see the queue is filling; they usually cannot tell you whether the stuck messages are Tuesday’s low-value test orders or the file the warehouse is waiting for.

The person who can answer that is the one who owns the data. So route it to them, and give them somewhere to look.

Step 4: a view for the people who publish the data

This is where self-service comes in. We created a user for the order desk and gave them access to the Orders integration only. When they sign in they see this:

  • Their integration and its status: receiving data, success rate, failed messages, delayed messages.
  • The queue depth, with the alert threshold drawn on the chart.
  • Their messages.

And nothing else. No other integrations, no service configuration, no edit buttons. They do not need to know what a span is.

(business user's view of the queue with the threshold line)
business user's view of the queue with the threshold line

The question “did my orders go through?” now has a place to be answered that is not a colleague’s inbox. The person who used to check the queue every morning gets their mornings back, and the data owner gets an answer in the time it takes to open a page.

Pitfalls

  • Pick an average, not a peak. A rule that fires on every blip teaches people to ignore it within a week.
  • Say what “normal” is. Look at a few days of history before you set the number, not at the day you are feeling nervous.
  • Filter the source. A shared broker has many queues. Without the destination filter your rule watches all of them.
  • Do not hand business users a trace ID. If the only identifier they can see is technical, they will still phone you. Add business metadata, such as partner or order owner, to the integration.
  • Remember the quiet case. A flow that stops sending shows an empty queue and a green dashboard.

Close

The morning queue check was never really the job. The job was making sure someone finds out, quickly, and that the person who finds out can do something about it. A person with a console is one way to do that. It is also the one that goes on holiday.

If you have a ritual like this in your team, we would like to hear about the oldest one. (Ours involved a spreadsheet and a person called Kjell.)