I'm using ZeroMQ.
I want a node B to subscribe to a node A. Node A will send ( PUB
? ) values of some 'volatile variable' (say, the position of some object). 'Volatile' in this case means that node B only cares about the most recent value.
The upshot should be that A can send values to subscribers, but if two values of the variable ever get queued up in the outgoing (or incoming) queues, then the most recent value would replace the earlier values. And another upshot would be: there's no high-water mark.
I can achieve this with PUB/SUB
, obviously, but that wouldn't get things like most-recent-value-always-wins. It seems like there'd be some established pattern to achieve this, but I haven't found it.
( I suppose this means I want a ZeroMQ socket pattern to work as if it's a pure udp
)