Kafka module
- class Kafka.Kafka(log: Log, config: Config)
Bases:
object
Class used for sending responses from APIs to kafka cluster
Initializes kafka producer
- Parameters:
log – Log object
config – Config object
- callback(err, msg)
This function gets called after producing a message containing response
- Parameters:
err – contains error message if delivery failed
msg – contains response message
- produce(msg: str)
Produce message to kafka topic
- Parameters:
msg – message to send to kafka topic