ESP32 mqtt without cayenne librarie?

Hello, I have a project with esp32 with the wifi.h libraries that connects to any mqtt server, but with cayenne it connects and disconnects every time. Is there a way to get mqtt to work without using the cayenne libraries?

share the code and serial monitor output with #define CAYENNE_DEBUG