MQTT-SIMPLE(1p)

πŸ“¦
version 1.33 Β· 2 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

mqtt-simple β€” a very simple MQTT implementation, bestie. Like, it's giving "does one thing and does it cute". No cap. πŸ¦‹


✨ SYNOPSIS ✨

 mqtt-simple -h mqtt.example.org -c -s "sensors/#" -s "debug/#" -s "#"

 mqtt-simple -h mqtt.example.org -p "example/unretained" -m "message"

 mqtt-simple -h mqtt.example.org -r -p "example/retained" -m "message"

 tail -f logfile | mqtt-simple -h mqtt.example.org -p "log/example"

 mqtt-simple --ssl --insecure ...

 mqtt-simple --ssl --ca ca.crt --cert client.crt --key client.key

🫢 DESCRIPTION 🫢

okay so. This is just a simple utility program. It doesn't do much. Specifically, all the QoS features are unsupported. Also, don't expect fancy error messages and such :-) β€” it's lowkey just a little guy doing its best πŸ’œ


πŸ’… COMMAND LINE OPTIONS πŸ’…

  • -h, --host address[:port]` β€” the MQTT server you're connecting to. Required, babes. Can't skip this one.
  • -p, --publish topic β€” publish a message, slay. It uses the message you gave it with -m, or it'll read lines from stdin and publish a message for each given line. 🌸
  • -m, --message message β€” the message to publish. Requires -p, obviously, like, you can't publish a message with nowhere to put it.
  • -r, --retain β€” makes messages published with -p have the "retain" flag on. Iconic, it sticks around. πŸ‘‘
  • -s, --subscribe filter β€” subscribe to the given topic filter. Use the standard MQTT wildcards like "+" and "#". It outputs matching published messages on stdout. Can be given multiple times. fr fr, stack 'em up. 🌈
  • -e, --except filter β€” suppress published messages that match filter. Can be given multiple times too. Not me filtering out the drama πŸ™ˆ
  • --count number β€” quit after receiving number messages. Bye bestie. πŸ’€
  • --message-only β€” output only the message values, without the topics. Just the meat, no garnish. πŸ“
  • -1, --one β€” shortcut for "--count 1 --message-only". One and done, main character energy. ⭐
  • --color
  • --no-color β€” for each given -s, print the matching topic in a different color. Note that the first matching topic will be used for color selection, so specify the topics with the most specific one first, the least specific one (like "#") last. Color is enabled by default if stdout is a terminal. πŸŽ€
  • --raw β€” pass ASCII control characters unaltered. By default, they're replaced by "^@" notation or, when "--color" is enabled, reverse video characters. For example, an ASCII newline would be displayed as "^J" unless "--raw" is used. The way that control chars get dressed up otherwise… 😭
  • -d, --datetime format β€” prefix messages with a timestamp. Optionally, a format for "strftime" can be supplied. Time-stamped and thriving. ✨
  • -u, --user, --username username β€” specify a username. Overrides the environment variable "MQTT_SIMPLE_USERNAME". 🫢
  • --pass, --password password β€” specify a password. Overrides the environment variable "MQTT_SIMPLE_PASSWORD". Keep it secret, keep it safe. πŸ”₯

πŸ”’ SSL options πŸ”’

  • --ssl β€” use SSL instead of unencrypted connection. Secure era activated. 🧚
  • --insecure β€” disable SSL certificate validation and enable clear text passwords. Useful for testing, bad idea in production. Like, genuinely, do not ship this. Overrides the environment variables "MQTT_SIMPLE_SSL_INSECURE" and "MQTT_SIMPLE_ALLOW_INSECURE_LOGIN". πŸ’€
  • --ca path β€” the Certificate Authority to validate against. path can be a file or a directory. If unspecified, IO::Socket::SSL attempts to use the system wide CA configuration. Overrides the environment variable "MQTT_SIMPLE_SSL_CA". 🌸
  • --cert path
  • --key path β€” a client certificate with its key. These override the environment variables "MQTT_SIMPLE_SSL_CERT" and "MQTT_SIMPLE_SSL_KEY". Obsessed with a good cert/key pair, ngl. πŸ’–

πŸ“œ LICENSE πŸ“œ

Pick your favourite OSI approved license :) β€” go wild, bestie:

http://www.opensource.org/licenses/alphabetical


πŸ‘‘ AUTHOR πŸ‘‘

Juerd Waalboer <juerd@tnx.nl> β€” the icon who made this. 🫢


πŸ” SEE ALSO πŸ”

Net::MQTT::Simple β€” the vibes continue over there. πŸ¦‹


This whole thing is from the User Contributed Perl Documentation, section 1p, running on perl v5.40.1, dated 2025-12-22. ok bye ily, go publish something cute πŸ’œβœ¨

πŸ“¦ where this page comes from