score:2

why not create a simple actor that would take in a callback as a constructor arg and then just sit in a:

while( running ) { 
  callback ( subscriber.recv( 0 ).asinstanceof[array[byte]] ) 
}

if the speed is not a requirement, you can also look at akka zeromq module, it follows a traditional non blocking message passing. however i found it a lot slower that a vanilla jzmq.


Related Query

More Query from same tag