Can I receive a MQTT(feed) to trigger ESP8266 interrupt?

Is it possible to trigger ESP8266 interrupts as soon as I received a message from a feed?

I am working on ESP8266 + LED strips and many of FastLED effects are running in loops.
Therefore, I couldn't change the lighting effects easily without interrupt.

Most examples I found were used a button to trigger an interrupt to change lighting effects.
However, I would like this effects to be changed as soon as I received a MQTT feed from Adafruit.

Thanks for your help!


An interrupt typically sets a 'flag' that is then acted upon by code in the main program. You should be able to use the reception of the MQTT message to set the same flag.

The key word here is 'should'. You aren't likely to get a more specific answer as long as you don't disclose your code.