pub-<MsgEnv>

A pub-<MsgEnv> is the smallest useful IPSME participant: a command-line tool that publishes one string on a messaging environment (ME) and prints every message it hears on that same ME. There is one per ME, each written in the language native to that ME and its operating system. Use one to check that an ME is up, to watch what the participants on it are saying, or to poke a participant by hand.

USAGE: pub-<MsgEnv> <0|1> <string>

The first argument says whether the tool keeps listening after it has published: 1 keeps it running and printing until it is stopped, 0 publishes, prints what arrives in the next moment and exits. The second argument is the string to publish, sent as is; no envelope is added.

Every tool subscribes before it publishes. By IPSME design a participant receives the messages it publishes itself, so each tool hears its own string back. Whether that echo is printed or dropped is noted on each tool’s page.

Implementations

Tool ME OS Written in

pub-NSDNC

NSDistributedNotificationCenter

macOS

Objective-C

pub-MQTT

MQTT broker (Eclipse Mosquitto)

Windows

C++

pub-sdbus

D-Bus system bus (systemd sd-bus)

Linux

C++

pub-ws

WebSocket server on localhost:8023

any (Node.js, packaged as one executable)

JavaScript

The three native tools are each a short main around the IPSME_MsgEnv wrapper library for their ME. The wrapper is where the ME’s address, channel and payload layout live; the tool only subscribes, publishes and loops. Each wrapper is its own repository and is pulled into the tool’s repository as a git submodule. pub-ws has no wrapper.

pub-ws is also the odd one out in usage: it takes no <0|1> argument and always keeps listening. See its page.