PAHO_C_SUB_STATIC(1L)

πŸ“¦
version 1.3.16 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– PAHO_C_SUB_STATIC πŸ’–

okay bestie, welcome to paho_c_sub_static, which lives in section 1L of the manual. She's the little sister program that sits there and receives stuff. Grab a strawberry πŸ“, we're doing MQTT.


✨ NAME ✨

paho_c_sub_static β€” receive (subscribe to) data from an MQTT server 🫢


🌸 SYNOPSIS 🌸

paho_c_sub_static [topic] [-t|--topic topic] [-c|--connection
connection] [-h|--host hostname] [-p|--port portnumber] [-i|--clientid
clientid] [-u|--username username] [-P|--password password]
[-k|--keepalive keepalive-timeout] [-V|--MQTT-version 31|311|5]
[-q|--qos 0|1|2] [-R|--no-retained] [--delimiter delimiter] [--no-
delimiter]
[--quiet] [--verbose] [--trace min|max|error|protocol]
[--will-topic will-topic] [--will-payload will-payload] [--will-retain]
[--will-qos 0|1|2]
[--cafile cafile] [--capath capath] [--cert certfile] [--key keyfile]
[--keypass password] [--ciphers cipher-string] [--insecure]

no cap, that's the whole vibe in one block πŸ¦‹


πŸŽ€ DESCRIPTION πŸŽ€

So paho_c_sub_static receives data from an MQTT server, and it does it using the Eclipse Paho C client asynchronous library (MQTTAsync). It's giving main character energy but make it a listener. πŸ’…

Now, MQTT? It's a protocol, bestie. It runs on top of TCP/IP, and it lets programs talk to each other sooo easily through a server. Messages get published to topics, and then they get delivered to anyone who subscribed to those topics. That's it, that's the whole thing. And if you ever wanna be the one sending instead of receiving, the matching publisher program paho_c_pub is right there for you. πŸ‘‘

The default mode of operation β€” the default vibe, if you will β€” is to output each message to stdout, terminated by the delimiter. Every message, straight to your screen. iconic. ✨


πŸ’… OPTIONS πŸ’…

okay this is the long part, but stay with me, every single one matters 🫢

  • -t, --topic β€” the MQTT topic to publish the data to. (yes, she says "publish" here, we are simply quoting the queen πŸ‘‘)
  • -c, --connection β€” the MQTT URI to connect to: a combo of transport prefix, host, port, and for websockets, a topic. Wanna go TCP? Use the tcp prefix, like tcp://localhost:1883. SSL/TLS girlie? ssl://localhost:1883. Websockets, insecure: ws://localhost:1883/topic, and secure: wss://localhost:80/topic. pick your fighter 🌈
  • -h, --host β€” the TCP/IP host name of the MQTT server you're connecting to. Together with the --port option, this is the older alternative to using --connection. vintage, but valid πŸ’œ
  • -p, --port β€” the TCP/IP port number of the MQTT server you're connecting to. Together with the --host option, also an older alternative to --connection. matching set πŸŽ€
  • -q, --qos β€” the MQTT QoS on which to publish the message. The alternatives are 0, 1 or 2.
  • -V, --MQTTversion β€” the version of the MQTT protocol to use. Valid options are 31 (or mqttv31), 311 (mqttv311) and 5 (or mqttv5). choose your era ✨
  • --quiet β€” do not print error messages. silence, but make it on purpose 🀫
  • --trace β€” print library internal trace. Valid levels are min, max, error and protocol. she's showing you her diary πŸ“–
  • -R, --no-retained β€” do not print messages which have the MQTT retained flag set. we're skipping the leftovers 🚫
  • --delimiter β€” the delimiter string to append to each message when printing. Defaults to newline.
  • --no-delimiter β€” do not add a delimiter to each message when printing. feral. no separator. chaos. πŸ’€
  • --will-topic β€” sets the MQTT will message topic to publish to. If the application ends without sending an MQTT disconnect, the will message will be published to this topic. it's giving last words 😭
  • --will-payload β€” only used if will-topic is set. Sets the MQTT will message to be published.
  • --will-qos β€” only used if will-topic is set. Sets the MQTT QoS at which the will message is published. The alternatives are 0, 1 or 2.
  • --will-retain β€” only used if will-topic is set. Sets the MQTT retained flag on the will message.
  • --cafile β€” only used with a TLS connection. The name of a file for the OpenSSL trust store. πŸ”
  • --capath β€” only used with a TLS connection. The name of a directory holding OpenSSL trusted certificates.
  • --cert β€” only used with a TLS connection. The name of a file for the TLS keystore containing a client certificate to be presented. show them your papers, bestie πŸͺͺ
  • --key β€” only used with a TLS connection. The name of a file containing the client private key. guard her with your life πŸ”‘
  • --keypass β€” only used with a TLS connection. The password for the client private key file, if needed.
  • --ciphers β€” only used with a TLS connection. A list of cipher suites that the client will present to the server during the TLS handshake. flex your suite list πŸ’…
  • --insecure β€” only used with a TLS connection. Don't check that the server certificate common name matches the hostname.
⚠️ heads up bestie: --insecure literally turns OFF a security check. It's right there in the name. use with intention, not by accident. 🚨

πŸ¦‹ SEE ALSO πŸ¦‹

go give these girlies a visit, they're all family:


and that's the whole page, bestie!! πŸŽ€βœ¨

this icon of a document came to you from http://eclipse.org/paho, dated 31 December 2020 and living at version v1.3.8 β€” from your girl PAHO_C_SUB_STATIC(1L), signing off πŸ’– subscribe responsibly, mwah πŸ’