Skip to content

dimgogos/nats-kafka

 
 

Repository files navigation

NATS

NATS-Kafka Bridge

License ReportCard Build Coverage

This project implements a multi-connector bridge between NATS, NATS Streaming, JetStream and Kafka topics.

Features

  • Support for bridging from/to Kafka topics
  • Arbitrary subjects in NATS and JetStream, wildcards for incoming messages
  • Arbitrary channels in NATS Streaming
  • Optional durable subscriber names for streaming
  • Configurable std-out logging
  • A single configuration file, with support for reload
  • Optional SSL to/from Kafka, NATS, NATS Streaming, and JetStream
  • HTTP/HTTPS-based monitoring endpoints for health or statistics
  • Support for Confluent schema registry and compatible implementations with Avro, JSON Schema and Protobuf.

Overview

The bridge runs as a single process with a configured set of connectors mapping a Kafka topic to a NATS/JetStream subject or a NATS Streaming channel. Connectors can also map the opposite direction from NATS to Kafka. Each connector is a one-way bridge.

Connectors share a NATS connection and an optional connection to the NATS Streaming server. Connectors each create a connection to Kafka, subject to TCP connection sharing in the underlying library

Message values in Kafka are mapped to message bodies in NATS.

Messages coming from NATS to Kafka can have their key set in a variety of ways, see Configuration. Messages coming from Kafka will have their key ignored.

Request-reply is not supported.

The bridge is configured with a NATS server-like format, in a single file and uses the NATS logger.

An optional HTTP/HTTPS endpoint can be used for monitoring.

Documentation

External Resources

License

Unless otherwise noted, the nats-kafka bridge source files are distributed under the Apache Version 2.0 license found in the LICENSE file.

About

NATS to Kafka Bridging

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 81.6%
  • Shell 17.3%
  • Other 1.1%