The following lovely tutorial helped me a lot. It provides all the setting plus ESP32 client. Just wonderful.
MQTT broker with secure (TLS) communication
The following lovely tutorial helped me a lot. It provides all the setting plus ESP32 client. Just wonderful.