We’re experiencing significant delays in device shadow state updates when devices publish state changes via MQTT to Cloud IoT Core. Our fleet of 800+ industrial sensors publishes state updates every 30 seconds, but the shadow state in the registry shows delays ranging from 2-5 minutes.
The Pub/Sub subscription is configured with default settings (ackDeadline: 10s), and devices are publishing with MQTT QoS 1. We’ve noticed that during peak hours (when 600+ devices are active), the shadow state propagation becomes even slower, affecting our real-time monitoring workflows.
Has anyone encountered similar latency issues with shadow state synchronization? We need shadows to reflect actual device state within 10-15 seconds for our alarm system to work properly.
I’ve seen this pattern before. The default Pub/Sub subscription settings might not be optimized for high-frequency updates. Check your subscription’s flow control settings - if messages are queuing up, that would explain the delay. Also, are you processing shadow updates synchronously or in batches?
Another thing to verify: are you updating the entire shadow document or just the delta? Full shadow updates take longer to propagate. We switched to delta-only updates and saw our propagation time drop from 3 minutes to under 20 seconds for a similar-sized fleet. The shadow merge operation is much faster when you’re only changing specific fields.
Thanks for the input. We’re processing updates as they arrive through a Cloud Function triggered by the Pub/Sub subscription. The function updates our internal state cache and forwards critical changes to the alarm service. I haven’t looked into flow control settings specifically - what values would you recommend for 800 devices publishing every 30 seconds?