Hi,

The docs say (http://doc.akka.io/docs/akka/2.3.10/scala/zeromq.html): "The
currently used version of zeromq-scala-bindings is only compatible with
zeromq 2; zeromq 3 is not supported."

You are trying to use ZeroMQ 4.

-Endre

On Tue, May 5, 2015 at 5:26 PM, Houwu Bai <[email protected]> wrote:

> For zmq version, the print out of the statement:
>   val zmq = ZeroMQExtension(system)
>   println(s"ZMQ ${zmq.version}" )
> shows:
> ZMQ 4.0.5
>
>
> On Tuesday, May 5, 2015 at 4:38:34 AM UTC-7, Akka Team wrote:
>>
>> Hi,
>>
>> Which version of ZeroMQ are you using? Btw, please note that Akka zeromq
>> support was deprecated in 2.3, and it is already removed in 2.4. See this
>> ticket for further details: https://github.com/akka/akka/issues/16636
>>
>> -Endre
>>
>> On Mon, May 4, 2015 at 8:46 PM, Houwu Bai <[email protected]> wrote:
>>
>>> Hi, I am trying to migrate some examples from the zmq guide (
>>> http://zguide.zeromq.org/page:all) to Akka. The wuserver example works
>>> in one direction: the messages sent out by the publisher can be received by
>>> a Java or Node.js client connected and subscribed. However, the other
>>> direction does not work: the subscriber in Akka-Zmq cannot receive any
>>> messages.
>>>
>>> When trying the very first hello-world example, I found that the actor
>>> cannot receive any message at all. The following is the short hwserver.scala
>>>
>>> import akka.actor.Actor.Receive
>>> import akka.actor.{ActorLogging, Actor, Props}
>>> import akka.util.ByteString
>>> import akka.zeromq._
>>>
>>> /**
>>>  * Created by hbai on 5/4/15.
>>>  */
>>> object HwServer {
>>>   def props(zmq: ZeroMQExtension): Props = Props(new HwServer(zmq))
>>> }
>>> class HwServer(zmq: ZeroMQExtension) extends Actor with ActorLogging {
>>>   val bindAddress = "tcp://*5555"
>>>
>>>   val repSocket = zmq.newSocket(SocketType.Rep, Listener(self),
>>> Bind(bindAddress))
>>>
>>>   override def receive: Receive = {
>>>     case m : ZMQMessage =>
>>>       println(s"Received ${m.frames.toString}")
>>>       sender ! m //ZMQMessage(ByteString("reply"))
>>>     case x @ _ =>
>>>       println(s"something received ${x}")
>>>   }
>>>
>>> }
>>>
>>> And, the following is the main:
>>>
>>>
>>> import akka.actor.{Props, ActorSystem}
>>> import akka.util.ByteString
>>> import akka.zeromq._
>>>
>>> /**
>>>  * Created by hbai on 5/1/15.
>>>  */
>>> object Main extends App {
>>>   val system = ActorSystem("sensity")
>>>   val zmq = ZeroMQExtension(system)
>>>   println(s"ZMQ ${zmq.version}" )
>>>
>>>
>>>   println("Starting hwServer")
>>>   val hwServer = system.actorOf(HwServer.props(zmq), name="hwServer")
>>> }
>>>
>>> I am using Scala 2.11.6, Akka 2.3.10, Java 1.8.0_40
>>>
>>>
>>>  --
>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>> >>>>>>>>>> Check the FAQ:
>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >>>>>>>>>> Search the archives:
>>> https://groups.google.com/group/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Akka Team
>> Typesafe - Reactive apps on the JVM
>> Blog: letitcrash.com
>> Twitter: @akkateam
>>
>  --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to