ANYEVENT-MQTT-PUB(1)
π ANYEVENT-MQTT-PUB(1)
okay so bestie, welcome to anyevent-mqtt-pub β it's a Perl script for publishing to an MQTT topic, and it lives in the User Contributed Perl Documentation section of the manual. she's little, she's mighty, she publishes. periodt. π
β¨ VERSION β¨
version 1.212810 β that's the version, no cap, write it down.
π¦ SYNOPSIS π¦
two ways to feed her, and honestly both are iconic:
# messages one per line on stdin
echo message | anyevent-mqtt-pub [options] topic
# message as command line arguments
anyevent-mqtt-pub [options] topic this is a message
πΈ DESCRIPTION πΈ
the whole vibe, in one sentence: this script publishes each line from stdin as an MQTT message on the given topic. that's it. that's the girl. π
π OPTIONS π
every single flag, coming right up β not one skipped, we don't do that here:
-helpβ prints a brief help message. lil snack-sized assist. β¨-manβ prints the manual page. hi, that's this one, you're literally reading her π«Ά-host A.B.C.Dβ the host running the MQTT service. default is127.0.0.1(the classic, the local legend).-port NNNNNβ the port of the running MQTT service. default is1883. iykyk.-client-id STRINGβ the client id to use in the connect message. default is'NetMQTTpm'followed by the process id of the process. and listen β for maximum compatibility it should be up to 23 characters and only use the charactersA-Z,a-z, and0-9. she's a little picky but it's for your own good π-qos Nβ the QoS level for the published message. default is0("MQTT_QOS_AT_MOST_ONCE"). low effort, high slay.-verboseβ include more verbose output. without this option the script only outputs errors. so if you want the tea, ask for the tea π-keepalive NNNβ the keep alive timer value. defaults to120seconds. and for simplicity, it's also currently used as the connection timeout. one number, two jobs, main character energy π-retainβ set the retain flag on the message. default is not set. so by default she does NOT retain, okay? don't @ her.
π₯ SEE ALSO π₯
AnyEvent::MQTT(3)β go read it, bestie, it's the whole ecosystem.
π DISCLAIMER π
this is not official IBM code. the author works for IBM but writes this in their spare time (with permission) for fun. so like β not corporate, not official, just a person having a good time. π§
π AUTHOR π
Mark Hindess <soft-cpan@temporalanomaly.com> β the icon behind the code π
β 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. slay, legally speaking. π
ok that's the whole page, no notes, nothing omitted π
sign-off time: this beauty comes to you from perl v5.42.2, dated 2026-04-15, and she ate. go publish something iconic, bestie β¨π¦
π¦ where this page comes from
- alpine 3.24: perl-anyevent-mqtt-doc 1.212810-r2 Β· 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