0.1.0 • Published 3 years ago

@1mill/kafka v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

@1mill/kafka

npm install @1mill/kafka
const { Kafka } = require('@1mill/kafka')

const kafka = new Kafka({
  brokers: 'https://rapids-1:9092,https://rapids-2:9092/' || process.env.1MILL_KAFKA_KAFKAJS_BROKERS,
  id: 'my-kafka-client-id' || process.env.1MILL_KAFKA_KAFKAJS_ID,
  mechanism: 'scram-sha-256' || process.env.1MILL_KAFKA_KAFKAJS_MECHANISM,
  password: 'my-password' || process.env.1MILL_KAFKA_KAFKAJS_PASSWORD,
  username: 'my-username' || process.env.1MILL_KAFKA_KAFKAJS_USERNAME,
})
RequiredTypeDefaultNotes
brokersyesString, Arrayprocess.env.1MILL_KAFKA_KAFKAJS_BROKERS'https://my-broker-1:9092/,https://my-broker-2:9092/' OR 'https://my-broker-1:9092/', 'https://my-broker-2:9092/'
idyesStringprocess.env.1MILL_KAFKA_KAFKAJS_ID
mechanismStringprocess.env.1MILL_KAFKA_KAFKAJS_MECHANISMOptions: 'plain', 'scram-sha-256', or 'scram-sha-512'
passwordStringprocess.env.1MILL_KAFKA_KAFKAJS_PASSWORD
usernameStringprocess.env.1MILL_KAFKA_KAFKAJS_USERNAME
const { Cloudevent } = require('@1mill/cloudevents')
const { Kafka } = require('@1mill/kafka')

const cloudevent = new Cloudevent({ ... })
const kafka = new Kafka({ ... })

await kafka.emit({ cloudevent })
0.1.0

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago