Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including logagent-output-kafka with all npm packages installed. Try it out:

var logagentOutputKafka = require("logagent-output-kafka")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

logagent-output-kafka v1.0.2

Logagent plugin to write messages to Apache Kafka

Logagent Plugin: Apache Kafka

Output plugin for @sematext/logagent. The plugin acts as message producer for Apache Kafka. This project is specular project of @sematext/logagent-input-kafka

Installation

Install @sematext/logagent and logagent-output-kafka npm package:

npm i -g @sematext/logagent 
npm i -g logagent-output-kafka

Configuration

# Global options
options:
  includeOriginalLine: false

input:
  stdin: true

output:
  kafka: 
   module: logagent-output-kafka
   host: localhost //by default use 9092 and 9093 for ssl
   topic: test
   requireAcks: 1
   sslEnable: false
   sslOptions: 
      - rejectUnauthorized: false

Start logagent

logagent --config logagent-kafka-output.yaml
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free