NET-MQTT-SUB(1)
π net-mqtt-sub β the manual page, but make it cute
okay so bestie, welcome to net-mqtt-sub(1) β a Perl script that subscribes to an MQTT topic and just... listens. Like that one friend who's always in the group chat reading everything but never typing. Iconic behaviour tbh. π
This one lives in the User Contributed Perl Documentation section of the manual, so you know it's hand-crafted with love.
β¨ NAME β¨
net-mqtt-sub β a Perl script for subscribing to an MQTT topic. that's it. that's the whole vibe. π¦
πΈ VERSION πΈ
version 1.163170 β yes that's a real version number, no I will not explain it, just accept her π
β SYNOPSIS β
net-mqtt-sub [options] topic1 [topic2] [topic3] ...
so you give her some options, then one or more topics, and she's off. multiple topics? she can hold more than one conversation at once. main character energy fr. π
π§ DESCRIPTION π§
This script subscribes to one or more MQTT topics, and prints any messages that it receives to stdout. That's the whole job description. She listens, she prints. Lowkey the dream. π
π OPTIONS π
-helpβ prints a brief help message. a little snack, a lil appetizer, if you will. π-manβ prints the manual page. that's this! hi! you're here! π«Ά-hostβ the host running the MQTT service. default is127.0.0.1, aka home base, aka where she feels safest.-portβ the port of the running MQTT service. default is1883. classic port, no notes. β¨-client-idβ the client id to use in the connect message. default is'NetMQTTpm'followed by the process id of the process. so like, she introduces herself with her name and her social security number. slay ig π-verboseβ include more verbose output. oh bestie, this one's a whole ladder, buckle up:- Without this option, the script only outputs errors and received messages, one per line, in the form:
topic message
- With one
-verboseoption, publish messages are printed in the form of a summary of the header fields and the payload in hex dump and text form. - With two
-verboseoptions, summaries are printed for all messages sent and received. - With three
-verboseoptions, a hex dump of all data transmitted and received is printed. three levels deep!! she is telling you everything. no secrets. π
-keepalive NNNβ the keep alive timer value. defaults to120seconds. and for simplicity, it is also currently used as the connection/subscription timeout. one number, two jobs, she's multitasking π-count NNNβ read the specified number of MQTT messages and then exit. default is0β read forever. forever-ever? forever-ever. π₯-oneor-1β short for-count 1. one message and she's out. read one message and exit. ghosting, but politely. π-usernameβ username to be used for authentication in the connection message.-passwordβ password to be used for authentication in the connection message. keep it secret, keep it safe π
π¦ SEE ALSO π¦
Net::MQTT::Message(3)β go read her sibling, she's cool too π
π DISCLAIMER π
This is not official IBM code. The author works for IBM but is writing this in their spare time (with permission) for fun. so it's a little side quest, a passion project, not a corporate situation. respect the hustle fr fr π
π AUTHOR π
Mark Hindess <soft-cpan@temporalanomaly.com> β the icon, the legend, the person who made this whole thing happen β¨
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2014 by Mark Hindess.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. free as in freedom bestie, go wild π¦
ngl the legal bits are the boring part but they matter, so here they are in full, no skipping, no cap. π―
so that's the whole page! and before you go β the footer on this one says perl v5.42.2, dated 2026-02-15, so like, timestamped and versioned and everything. mwah. take care of her, she's doing her best. πβ¨πΈ
π¦ where this page comes from
- alpine 3.24: perl-net-mqtt-doc 1.163170-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms