{"repo":"Effiware/kafka-mocha","free":true,"listed":false,"github":"https://github.com/Effiware/kafka-mocha","clone":"git clone https://github.com/Effiware/kafka-mocha.git","description":"Embedded Kafka for Python - Testing library for confluent_kafka","language":"Python","stars":16,"topics":["confluent","confluent-kafka","kafka","python","testing","embedded","emulator"],"license":"MIT","category":"data-pipelines","readme_excerpt":"Embedded Kafka (Kafka Simulator) for Python Embedded Kafka is a mocking library for the confluent kafka library used for Apache Kafka. Its goal is to ease the effort of writing integration tests that utilize Producer and/or Consumer instances. Of course, you can always span your own Kafka Cluster just for testing purposes, but it is not always the best solution. With kafka mocha you no longer need to have a Kafka Cluster running to test your Kafka-related code. Instead, you can use the KProducer and KConsumer (by simply decorating your code with @mock producer / @mock consumer ) and check the behavior of your code - or even the messages that are being produced and consumed in the browser! Inspiration for this project comes from the moto library, which provides a similar feature for AWS SDK. Support me with Project Overview The main component of this project is a process called KafkaSimulator which simulates the behavior of an actual Kafka Cluster, within the bounds of implementation limitations. The current version includes a KProducer class that acts as a mock for the Producer from the confluent kafka package, and a KConsumer class that acts as a mock for the Consumer from the same package. Both classes can be used as decorators to mock the behavior of the respective classes in your tests, allowing you to produce and consume messages without the need for a real Kafka Cluster. Behavior replication is quite advanced, including support for transactions, manual management of off","default_branch":null,"files":null,"tree":[],"storefront":"/r/Effiware","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Effiware/kafka-mocha/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}