topic-stream
The topic-stream is a writable stream which translates objects written to into JSON messages which it sends over an AMQP topic.
Example
This is a simple example using event-stream to pipeline data entered via stdin, split it into lines and send it via topic stream to /events/input
over AMQP.
"use strict"; var es = ;var amqplib = ;var topicStream = ;var log = 'read-stdin-topic-stream'; // exit once we have processed the data that was piped in.processstdin; ; var open = amqplib; ;
Anything sent to stdin on the process will be split into lines and packaged into AMQP messages.
TODO
- Add the option to just pass an AMQP URL.
License
Copyright (c) 2013 Mark Wolfe Licensed under the MIT license.