Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (63 sloc) 2.23 KB

A Mesos reference implementation

This reference implementation of dnpipes is based on DC/OS using Apache Kafka.


From source:

$ go get
$ go build
$ sudo mv dnpipes /usr/local/dnpipes

From binaries, for Linux:

$ curl -s -L -o dnpipes
$ sudo mv dnpipes /usr/local/dnpipes
$ sudo chmod +x /usr/local/bin/dnpipes

From binaries, for macOS:

$ curl -s -L -o dnpipes
$ sudo mv dnpipes /usr/local/dnpipes
$ sudo chmod +x /usr/local/bin/dnpipes

Example session

To try it out yourself, you first need a to install a DC/OS cluster and then Apache Kafka like so:

$ dcos package install kafka

Note that if you are unfamiliar with Kafka and its terminology, you can check out the respective Kafka 101 example now.

Next, figure out where the brokers are (in my case I started Kafka with one broker):

$ dcos kafka connection

  "address": [
  "zookeeper": "master.mesos:2181/dcos-service-kafka",
  "dns": [
  "vip": ""

Now, an example session using the dnpipes reference implementation looks as follows. I've set up two terminals, in one I'm starting the dnpipes in publisher mode:

$ ./dnpipes --mode=publisher --broker=broker-0.kafka.mesos:9951 --topic=test
> hello!
> bye
2016/12/11 13:38:57 Connected to
2016/12/11 13:38:57 Authenticated: id=97087250213175381, timeout=4000
[0] - &{Czxid:295 Mzxid:295 Ctime:1481463523762 Mtime:1481463523762 Version:0 Cversion:1 Aversion:0 EphemeralOwner:0 DataLength:0 NumChildren:1 Pzxid:296}
reset this dnpipes
> ^C

The second terminal has dnpipes in subscriber mode running:

$ ./dnpipes --mode=subscriber --broker=broker-0.kafka.mesos:9951 --topic=test 2>/dev/null

And here's a screen shot of the whole thing:

screen shot of example dnpipes session