Created
November 9, 2017 00:16
-
-
Save benstopford/2560dafc52e87da40e657e9c0d60bf08 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//In Node.js service | |
var nodemailer = require('nodemailer'); | |
… | |
var kafka = require('kafka-node'), | |
Consumer = kafka.Consumer, | |
client = new kafka.Client(), | |
consumer = new Consumer(client, [ { topic: 'platinum_emails', partition: 0 } ] ); | |
consumer.on('message', function (orderConsumerTuple) { | |
sendMail(orderConsumerTuple); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment