MQTT on Docker - How to Test

I am moving my entire setup to docker, but never used MQTT before as I couldn’t really get it to work on the Pi. I’ve skimmed the board and I am not really finding an answer.

Once I install the MQTT docker component and configure it in Home Assistant, what can be done to test and see if it’s working?
I am assuming creating some sort of an input_boolean and try to turn it on or off remotely?

Anyone would have any experience or a suggestion?

you can configure mqtt with a lwt message and see the outcome:

mqtt:
  broker: !secret mqtt_broker
  client_id: hassio
  username: !secret mqtt_username
  password: !secret mqtt_password
  birth_message:
    topic: 'hassio/status'
    payload: 'online'
    qos: 1
    retain: true
  will_message:
    topic: 'hassio/status'
    payload: 'offline'
    qos: 1
    retain: true

as long as home assistant is connected to your mqtt broker hassio/status will return online. when the connection is lost it will return offline after a few seconds (depending on your broker’s configuration)

you can use tools like mqtt-spy or mqtt.fx to monitor your mqtt broker from your computer.

Thanks Florian,
I will try this in the next few days, for now my kodi box broke and need to get it back up for the family to enjoy.