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
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.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 5 s.
- 2
Name the relationship. messages = 86,400 / interval x 50 sensors x 30 days / 1,000,000
- 3
Substitute with units. 86,400 / 5 x 50 x 30 / 1,000,000 = 25.92 million
- 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.
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?
What does this small model leave out?
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, about25.9M, costing25.92 x $1 = $25.92at $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, costing0.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.