[zeromq-dev] ZPER - Kafka inspired persistence broker
Yu Dongmin
miniway at gmail.com
Fri Dec 7 11:04:58 CET 2012
Hello,
I started a fun project ZPER, zeromq persistence broker.
https://github.com/miniway/zper
This works similar as Apache kafka does.
Here's the sample of producer code. Then broker will store message as ZMTP 2.0 raw format.
------------
Context ctx = ZMQ.context (1);
Socket sock = ctx.socket (ZMQ.DEALER);
sock.setIdentity (ZPUtils.genTopicIdentity (topic, 0)); // flag = 0
sock.connect ("tcp://127.0.0.1:5555"); // broker address
while (true) {
String data = "hello";
sock.send (data);
sleep (1);
}
sock.close ();
ctx.term ();
-----------
Please enjoy ZPER.
Thanks
Min
More information about the zeromq-dev
mailing list