On ZeroMQ it could be something like that...first you need a broker (a proxy) using XSUB and XPUB.
In one pharo image... (I think this part better be done in C because it will freezy the image forever but it works)
��| frontend backend |
frontend := ZmqXSubscriberSocket new.
frontend bind: 'tcp://*:5559'.
backend := ZmqXPublisherSocket new.
backend bind: 'tcp://*:5560'.
ZmqProxy frontend: frontend backend: backend capture: nil
In any publisher or subscriber...
publisher := ZmqPublisherSocket new connect: 'tcp://localhost:5559'.
pr1 := [
|subscriber1|
subscriber1 := ZmqSubscriberSocket new connect: 'tcp://localhost:5560'.
[true] whileTrue:[
�� �� �� �� �� "receive is non blocking so this is an infinite loop"
subscriber1 receiveIfAvailable: [ :messageData| ��
messageData isEmpty ifFalse:[Transcript show: ('Subscriber 1 got stuff ' , messageData);cr]]
]] forkNamed: 'subscriber1'.
"Publish doing that"
��publisher send: ('Hello Subscribers') asByteArray.