MQTT-SIMPLE(1p)
π 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,--hostaddress[:port]` β the MQTT server you're connecting to. Required, babes. Can't skip this one.-p,--publishtopic β 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,--messagemessage β 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-phave the"retain"flag on. Iconic, it sticks around. π-s,--subscribefilter β 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,--exceptfilter β suppress published messages that match filter. Can be given multiple times too. Not me filtering out the drama π--countnumber β 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,--datetimeformat β prefix messages with a timestamp. Optionally, a format for"strftime"can be supplied. Time-stamped and thriving. β¨-u,--user,--usernameusername β specify a username. Overrides the environment variable"MQTT_SIMPLE_USERNAME". π«Ά--pass,--passwordpassword β 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". π--capath β the Certificate Authority to validate against. path can be a file or a directory. If unspecified,IO::Socket::SSLattempts to use the system wide CA configuration. Overrides the environment variable"MQTT_SIMPLE_SSL_CA". πΈ--certpath--keypath β 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
- ubuntu resolute: libnet-mqtt-simple-perl 1.33-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-mqtt-simple-perl 1.33-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms