NET-MQTT-PUB(1)
π net-mqtt-pub(1) β the group chat, but for MQTT β¨
okay so bestie, welcome to net-mqtt-pub, a Perl script for publishing to an MQTT topic π (yes, this is section NAME, and yes it's exactly that). It ships as part of the Net::MQTT docs situation, and this page lives in the User Contributed Perl Documentation section. iykyk. π¦
β VERSION β
version 1.163170 β that's the one, no cap π
β¨ SYNOPSIS β¨
two whole modes, pick your fighter:
# messages one per line on stdin
echo message | net-mqtt-pub [options] topic
# message as command line arguments
net-mqtt-pub [options] topic this is a message
like, either you pipe lines in, or you just say the message out loud on the command line. both iconic, both valid π«Ά
πΈ DESCRIPTION πΈ
so here's the vibe: this script publishes each line from stdin as an MQTT message on the given topic. that's it. that's the whole personality. every line = one message, one message = one line. slay. π
π OPTIONS π
-helpβ prints a brief help message. the lil tl;dr of the situation β¨-manβ prints the manual page. hi, that's this, you're here, main character energy π-hostβ the host running the MQTT service. default is127.0.0.1(yes, localhost-core π )-portβ the port of the running MQTT service. default is1883π₯-client-idβ the client id to use in the connect message. default is'NetMQTTpm'followed by the process id of the process. so it's likeNetMQTTpm+ your pid, a little name tag for your connection π·οΈ-verboseβ include more verbose output. without this option the script only outputs errors π so like, if it's quiet, that's on purpose-keepalive NNNβ the keep alive timer value. defaults to120seconds. and for simplicity, it is also currently used as the connection timeout β one number, two jobs, multitasking queen π-retainβ set the retain flag on the message. default is not set π
π¦ SEE ALSO π¦
Net::MQTT::Message(3)β go read the real one, bestie, it's giving source material π
π DISCLAIMER π
this is not official IBM code. the author works for IBM but wrote this in their spare time (with permission) for fun. so like, it's a passion project, not a corporate thing, okay? don't @ them with IBM tickets π
π AUTHOR π
Mark Hindess <soft-cpan@temporalanomaly.com> π«Ά
π 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. so yeah, free software, go off π
and that's a wrap, bestie!! this page brought to you by perl v5.42.2, dated 2026-02-15 β go publish some messages, you absolute icon βππ¦
π¦ 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