Simple Kafka connector
npm install @treecg/connector-kafka@treecg/connector-kafkaConnector that used kafka to communicate messages.
- topic: required parameter, the value is a json object as described at section Topic Config
- consumer: required parameter, the value is a json object as described at section Consumer Config
- producer: required parameter, the value is a json object as described at section Producer Config
- broker: required parameter, the value is either a string denoting the location of the config as described at section Broker Config, or a json object as described at section Broker Config
- name: the name of the topic
- fromBeginning: optional, relevant for reader only. If set the reader will read all items on the kafka topic, not just the newly generated items.
No required parameters
For more information see KafkaJs.
- groupId: required parameter denoting the group (only used by the reader)
Other optional consumer parameters
metadataMaxAge, sessionTimeout, rebalanceTimeout, heartbeatInterval, maxBytesPerPartition, minBytes, maxBytes, maxWaitTimeInMs, allowAutoTopicCreation, maxInFlightRequests, readUncommitted, rackId.
For more information see KafkaJs.
- hosts: list of strings denoting the brokers or bootstrap servers.
- clientId: id used to connect to kafka
Other optional kafka parameters
ssl, sasl and many more
For more information see KafkaJs.