See below code. This is supposed to send a test message periodically using the Timer, but it only does so once. The LED blink that accompanies the publish only occurs once as well. Thanks!
You should think about Timer callback like an interrupt service routine; very little should happen inside that function. You have placed some blocky code in there. I’d look to write non-blocking methods for that blinking.
Even if that isn’t responsible for the problem you are seeing, it could factor. I suspect this is a component of a larger program.