akka-zeromq doesn't receive messages with libzmq 3.2
Trying to accept message on a pull socket with akka-zeromq does not work with libzmq 3.2.2 (Arch linux). Downgrading the library to 2.2.0 works. Here is the Scala code:
Here it the python script that does the sending:
In the case of version 3, the only output is Connecting and nothing else happens. In the case of 2.2 - it works as expected. Also, when using v3 and pressing enter (pass the readLine() line) the app does not exit. I should send it a message, which doesn't get printed, but the app exists gracefully.
package main
import akka.actor._
import akka.zeromq._
class ZmqActor extends Actor {
def receive = {
case x => println("M: " + x.toString)
}
}
object Main extends App {
val system = ActorSystem("system")
val listener = system.actorOf(Props[ZmqActor], "zmq-actor")
// val subSocket = ZeroMQExtension(system).newSocket(SocketType.Sub,
// Listener(listener), Connect("tcp://127.0.0.1:8008"), SubscribeAll)
val pullSocket = ZeroMQExtension(system).newSocket(
SocketType.Pull, Listener(listener), Connect("tcp://127.0.0.1:8008"))
println("Press ENTER to exit")
Console.readLine()
system.shutdown()
}
Here it the python script that does the sending:
import zmq
ctx = zmq.Context()
sock = ctx.socket(zmq.PUSH)
sock.bind("tcp://*:8008")
sock.send("test")
In the case of version 3, the only output is Connecting and nothing else happens. In the case of 2.2 - it works as expected. Also, when using v3 and pressing enter (pass the readLine() line) the app does not exit. I should send it a message, which doesn't get printed, but the app exists gracefully.
Leave a comment
Not likely an Akka bug, but a driver bug, please report it to: https://github.com/valotrading/zeromq-scala-binding