There are several MQTT broker service providers on the internet that you can use to create MQTT-based messaging applications if you do not want to host your own MQTT broker. Many also offer free public MQTT brokers that you can use for testing and quick proofs-of-concept—but remember they are free and public, so do not publish any sensitive information!
If you experience frustration, disconnections, or unexpected behavior with a free public broker service, then test and verify your application with a local broker. You cannot reliably know or verify the traffic congestion, topic usage, or configuration details of an open public broker and how that may be impacting your application.
Here are a few free public brokers you can try. Just replace the -h localhost option in the preceding examples with the address of the broker. Visit the following pages for more information and instructions: