kafka_prod_receiver

command
v0.0.0-...-d700847 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

README

Kafka Producer Receiver

A Kafka Producer Receiver for handling metrics from PostgreSQL databases. This implementation creates a separate topic for each Database and pushed the measurements as JSON in these Topics.

Features

  • Dynamic Topic Management: Automatically add or remove PostgreSQL databases as topics based on incoming metrics.
  • Error Handling: Robust error handling for connection management and message writing.
  • JSON Serialization: Serialize measurement data to JSON before sending it to Kafka.

Usage

go run ./cmd/kafka_prod_receiver --port=<port_number_for_sink> --kafkaHost=<host_address_of_kafka> --autoadd=<true/false>

Command-Line Flags

  • port: Specify the port where the sink will receive measurements (required).
  • kafkaHost: Specify the host and port of the Kafka instance (default is localhost:9092).
  • autoadd: Enable or disable automatic addition of new databases as Kafka topics (default is true).

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL