ZeroMQ Callbacks for Java / Scala
1 answer
Why not create a simple Actor that accepts a callback as the arg constructor and then just sits in a:
while( running ) {
callback ( subscriber.recv( 0 ).asInstanceOf[Array[Byte]] )
}
If speed is optional, you can also look at the AKKA ZeroMQ module , this follows the traditional non-blocking message. However, I found this to be much slower than vanilla JZMQ.
+2
source to share