A typical operating layout has parts that report things and those events are published. A sensor notices that a train showed up: TxNamib/sensor/2003/04 ACTIVE
Some things we want to change, the train is on the main line and we want it to take the siding at the next turnout, so we publish: TxNamib/turnout/1002/02 THROWN
Each of the prior examples "publish" to a message to a topic.
We also need some things to listen the these topics, so they need to "subscribe". Anything subscribed to TxNamib/turnout/1002/# will receive the TRHOWN for ../02 and if it is the hardware to control turnout 02 on that topic, it can now change the turnout to guide the train to the siding.
JMRI could be subscribed to all these topics and decide to change a signal mast to STOP when sensor 04 goes ACTIVE. So, TxNamib/signal/3001/04 Stop