0.12.0 • Published 20 days ago

terafoundation_kafka_connector v0.12.0

Weekly downloads
13
License
MIT
Repository
github
Last release
20 days ago

Kafka Connector

Terafoundation connector for Kafka producer and consumer clients.

To install from the root of your terafoundation based service.

npm install terafoundation_kafka_connector

Configuration:

The terafoundation level configuration is as follows:

FieldTypeDefaultDescription
brokersArray"localhost:9092"List of seed brokers for the kafka environment
security_protocol"plaintext", "ssl""plaintext"Protocol used to communicate with brokers
ssl_ca_locationString-File or directory path to CA certificate(s) for verifying the broker's key
ssl_certificate_locationString-Path to client's public key (PEM) used for authentication
ssl_crl_locationString-Path to CRL for verifying broker's certificate validity
ssl_key_locationString-Path to client's private key (PEM) used for authentication
ssl_key_passwordString-Private key passphrase

When using this connector in code, this connector exposes two different client implementations. One for producers type: producer and one for consumers type: consumer.

NameDescriptionDefaultRequired
optionsConsumer or Producer specific optionssee belowY
topic_optionslibrdkafka defined settings that apply per topic.{}N
rdkafka_optionslibrdkafka defined settings that are not subscription specific.{}N

The options object enables setting a few properties

NameDescriptionDefaultRequired
typeWhat type of connector is required. "consumer" or "producer".consumerN
groupFor type 'consumer', what consumer group to useN/AN
poll_intervalFor type 'producer', how often (in milliseconds) the producer connection is polled to keep it alive.100N

Consumer connector configuration example:

{
    options: {
        type: 'consumer',
        group: 'example-group'
    },
    topic_options: {
        'enable.auto.commit': false
    },
    rdkafka_options: {
        'fetch.min.bytes': 100000
    }
}

Producer connector configuration example:

{
    options: {
        type: 'producer',
        poll_interval: 1000,
    },
    topic_options: {},
    rdkafka_options: {
        'compression.codec': 'gzip',
        'topic.metadata.refresh.interval.ms': -1,
        'log.connection.close': false,
    }
}

Terafoundation configuration example:

terafoundation:
    connectors:
        kafka:
            default:
                brokers: "localhost:9092"
0.12.0

20 days ago

0.11.2

3 months ago

0.11.1

6 months ago

0.9.3

12 months ago

0.10.0

12 months ago

0.11.0

9 months ago

0.9.0

1 year ago

0.9.2

12 months ago

0.9.1

1 year ago

0.8.0

3 years ago

0.7.0

3 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.3

4 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.0

5 years ago