ANYEVENT-MQTT-PUB(1)

πŸ“¦ version 1.212810, in alpine 3.24

πŸ’… 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 is 127.0.0.1 (the classic, the local legend).
  • -port NNNNN β€” the port of the running MQTT service. default is 1883. 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 characters A-Z, a-z, and 0-9. she's a little picky but it's for your own good 😭
  • -qos N β€” the QoS level for the published message. default is 0 ("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 to 120 seconds. 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 πŸ”₯

πŸ’€ 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 πŸ’œ

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