ESP32 disconnect after sending data once to MQTT

Alright.
And what about sending multiple messages like "EEG Sensor" and "EMG Sensor" as defined in my code to send them to MQTT broker? I just wants to know why the code is not reading the second if and else statement for the second message and also MQTT does not subscribes to the second message itself?
Thank you.