Most of Those Messages Never Needed to Exist

Most of Those Messages Never Needed to Exist

Ada re-derives this chapter’s own numbers step by step, at full precision

foundations
math-foundations
calculation-audit
mqtt
Ada ADA · CALCULATION AUDIT

Most of Those Messages Never Needed to Exist

In this lab, 50 sensors publishing every 5 seconds each emit 17,280 messages a day, and the chapter notes that about 99% of them report an unchanged value. Switch to publishing on change with a 5-minute heartbeat and each sensor drops to 360 messages a day. This audit traces the counts end to end to size the real win and confirm that most of those messages never needed to exist.

Companion to the chapter Lab: MQTT Hands-On — every number here comes from that chapter.

See the relationship before changing it

The figure reads from left to right. The blue card is publish interval. The middle card applies the page rule. The green card is fleet messages per month. Walk the arrows once: set the input, apply the rule, then read the result with its unit.

Publish interval changes fleet messages per month An input card leads through the rule messages = 86,400 / interval x 50 sensors x 30 days / 1,000,000 to the fleet messages per month result. INPUT PAGE INPUT APPLY THE RULE predict calculate check units OUTPUT RESULT
Walk the arrows. A short timer repeats unchanged data and bills for every redundant message.

Derive the baseline in four named moves

  1. 1

    Name the input. The chapter baseline is 5 s.

  2. 2

    Name the relationship. messages = 86,400 / interval x 50 sensors x 30 days / 1,000,000

  3. 3

    Substitute with units. 86,400 / 5 x 50 x 30 / 1,000,000 = 25.92 million

  4. 4

    Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.

Predict, then change publish interval

Try Predict the direction of messages = 86,400 / interval x 50 sensors x 30 days / 1,000,000. Test another publish interval, then compare fleet messages per month.

5 s
Chapter baseline
Fleet messages per month

Observe A short timer repeats unchanged data and bills for every redundant message. Reset publish interval to 5 and compare fleet messages per month.

Explain A short timer repeats unchanged data and bills for every redundant message.

Check yourself

What should you do before trusting a moved-control result?
Answer: Predict its direction, apply the shown relationship, keep the units, and reset to the worked baseline.
What does this small model leave out?
Answer: Only publish interval moves here. Field effects named in the technical boundary stay fixed.
TryRecompute Per sensor: 86,400 s/day / 5 s = 17,280 msgs/day.
ObserveTrack Fifty sensors: 17,280 x 50 = 864,000 msgs/day.
ExplainExplain Per month: 360 x 50 x 30 = 540,000 msgs, costing 0.54 x $1 = $0.54.

Ready: use the stated baseline inputs, then compare each displayed result.

Ada: The worked example quotes several message counts and a monthly bill. Let me trace them end to end and pin down the true size of the reduction, because it is the metered message count, not the sensor count, that drives the cost.

Timer-based publishing, every 5 seconds:

  • Per sensor: 86,400 s/day / 5 s = 17,280 msgs/day
  • Fifty sensors: 17,280 x 50 = 864,000 msgs/day
  • Per month: 864,000 x 30 = 25,920,000 msgs, about 25.9M, costing 25.92 x $1 = $25.92 at $1 per million

Change-plus-heartbeat publishing:

  • Per sensor: 72 changes/day + 288 heartbeats/day = 360 msgs/day
  • Per month: 360 x 50 x 30 = 540,000 msgs, costing 0.54 x $1 = $0.54

Now the honest size of the win: 17,280 / 360 = 48x fewer messages, equivalently a 1 - 540,000 / 25,920,000 = 97.9% cut, the same ~98% the chapter’s bandwidth line reports. Put plainly, when a room’s temperature is flat, roughly forty-seven of every forty-eight five-second messages carry no new information. Publishing on change with a heartbeat floor deletes that redundancy at the source, so the metered bill and the broker load fall with the message count, not with the number of sensors.

Every number above is taken from the chapter’s own material and re-derived step by step.

Technical boundaries. This message-count audit deliberately does not simulate sensor noise spectra, broker congestion, or event correlation. It applies the chapter's fixed sampling and change-threshold assumptions to count avoidable publishes.