I have done this in my EDI life though. In the Automotive industry, there was a program called Sequenced Part Delivery. As a car moved through the assembly line, the VIN number was read and broadcast to each supplier on the line. The supplier would then know how far along the vehicle was and in what order. The supplier was tasked to bring the parts required for that vehicle in that order to arrive just-in-time for assembly.
The lessons learned from this was it was important to queue and preserve the messages as they came in. That way, if there was an interruption in your processing (back up, reboot, maintenance), you would not miss any records. But it is also necessary to make sure you didn’t process records twice so some coding and data structures were required to handle that. Also, having the full history gave you the ability to do some time-series analysis. We had to write much of this but the Azure IoT gives you a lot of that.
How does the CNC deliver the information? Serial port? TCP message?