Q : "Is it possible to use ZMQ part of Anaconda for custom messaging between jupyter notebooks somehow?"
Sure.
Option A :
One may extend the jupyter framework to include all your new functionalities in FOSS core
Option B :
One may instantiate one's own ZeroMQ signaling / messaging infrastructure on top of & independent from the jupyter internal signaling / messaging functionalities, and work just with a pure user-level code.
include zmq
my1stContextINSTANCE = zmq.context() # The Engine
my1stPublisherSOCKET = my1stContextINSTANCE.socket( zmq.PUB ) # its Socket
my1stPublisherSOCKET.setsockopt( zmq.LINGER, 0 ) # configurations
my1stPublisherSOCKET.setsockopt( zmq.SNDBUF, 2000000 ) # ...
...
my1stPullDataSOCKET = my1stContextINSTANCE.socket( zmq.PULL )# its Socket
my1stPullDataSOCKET.setsockopt( zmq.LINGER, 0 ) # configurations
my1stPullDataSOCKET.setsockopt( zmq.RCVBUF, 100000 ) # ...
...
while True:
...
my1stPublisherSOCKET.send( "INF: message payload[{0:}]".format( repr( _ ) ) )
...
if ( my1stPullDataSOCKET.poll( 0 ) ) ... ):
...
elseif:
...
else:
...
continue
Reciprocally the same on all the other peer-sides.
The ZeroMQ framework is smart for doing this, either way. You may like to read this & this.
The architecture design & the implementation wisdom & robustness is yours.