Regardless, I’ll take a stab at it. I’m guessing that your cavalier attitude towards stack space is blowing up the memory allocated for the task in which callback() is running.
Alternately, if callback() is running in interrupt context (I really don’t know, since your code is incomplete and the MQTT library is not evident), then you’re doing a an awful lot of stuff in an ISR.