ZeroMQ module for Akka

46 views
Skip to first unread message

Karim Osman

unread,
Jul 15, 2011, 8:06:58 AM7/15/11
to Akka User List
Hi all,

I've been recently working on a rather simple wrapper for ZeroMQ that
employes Akka actors, akka-zmq [1]. Currently, it supports dealer-
router, dealer-dealer, and pub-sub connection patterns. The idea is
that you can send messages to an actor that wraps a connection for
sending the message using ZMQ, e.g.:

val publisher = ZMQ.createPublisher(context, new
SocketParameters(endpoint, Bind))
publisher ! ZMQMessage("hello world".getBytes)

The module also supports sending of protobuf messages, e.g.:

publisher !
SomeProtobufMessage.newBuilder.setFieldA("A").setField("B").build

For more examples, you can check the existing test cases:

https://github.com/kro/akka-zmq/tree/master/src/test/scala/akka/zmq

Feedback is most welcome :)

Karim

1. https://github.com/kro/akka-zmq
Reply all
Reply to author
Forward
0 new messages