NET-MQTT-SUB(1)

πŸ“¦ version 1.163170, in alpine 3.24

πŸ’… 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 is 127.0.0.1, aka home base, aka where she feels safest.
  • -port β€” the port of the running MQTT service. default is 1883. 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 -verbose option, 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 -verbose options, summaries are printed for all messages sent and received.
  • With three -verbose options, 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 to 120 seconds. 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 is 0 β€” read forever. forever-ever? forever-ever. πŸ”₯
  • -one or -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 πŸ¦‹


🌈 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 ✨


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