Scenario IoT device (currently IPv4 device) that sends via TCP socket a payload to a server once per day. The server has a public IP address, the device is behind a router/NAT. I'm going to use a module based upon ESP8266 (i.e. Olimex one)
Goal The server should be able to send data to any client whenever it needs to. I'm no interested in direct client-to-client communication (i.e. connect to a device from my smartphone) like the hole punching is supposed to do.
Other requirements The IoT devices might grow up to several thousands. Their Internet connection is provided by a 4G-enabled router/modem.
Proposed solution As far as I understand a common solution is MQTT. The clients periodically send data to the broker (i.e. Mosquitto running on the hosting server), that in turn updates the main web app that runs on the same server.
Question Can the web app send data to any client whenever it needs through the broker? In other words: can a subscriber send back data to a specific publisher asynchronously (i.e. without waiting for the next transmission) ?