loopback-kafka-producer-mixin
Kafka Producer mixin for loopback to add sendEvent method to your models.
INSTALL
npm install loopback-kafka-producer-mixin --save
SERVER CONFIG
Add the mixins
property to your server/model-config.json
:
MODEL CONFIG
To use with your Models add the mixins
attribute to the definition object of your model config.
CONNEXIONS
To be able to connect to your kafka host or zookeeper host, you have to set the KAFKA_URL env variable
export KAFKA_URL=192.168.99.100:2181