Giter Site home page Giter Site logo

saabeilin / kafkian Goto Github PK

View Code? Open in Web Editor NEW
28.0 4.0 3.0 122 KB

An opinionated Kafka producer/consumer built on top of confluent-kafka-python/librdkafka

License: Apache License 2.0

Python 99.40% Makefile 0.60%
kafka kafka-producer kafka-consumer

kafkian's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kafkian's Issues

[Feature Request] Ability to Disable Logging

I really love this module, but would love the ability to disable logging. There are times when I would rather not have message contents in our Kibana logs, plus the other output puts unnecessary noise in the logs. I love the logging during development, however.

How to stop consumer.

I know this is a silly question, but I don't know how to do that.
I try to check if message is None, but the consumer just stops consuming if there is no update, and message is the last message.

Could you please tell me how to do that?

for message in consumer: if message is not None: consumer.commit() else: consumer._close() break

RecordNameStrategy and TopicRecordNameStrategy should not have suffix.

According to the following java code,
https://github.com/confluentinc/schema-registry/blob/master/avro-serializer/src/main/java/io/confluent/kafka/serializers/subject/TopicNameStrategy.java

https://github.com/confluentinc/schema-registry/blob/master/avro-serializer/src/main/java/io/confluent/kafka/serializers/subject/RecordNameStrategy.java

https://github.com/confluentinc/schema-registry/blob/master/avro-serializer/src/main/java/io/confluent/kafka/serializers/subject/TopicRecordNameStrategy.java

I think,

  • in case of RecordNameStrategy, a subject must be the <fully-qulified avro recordName>.
  • in case of TopicRecordNameStrategy, a subject must be the <topicName>-<fully-qulified avro recordName>.

But,
https://github.com/saabeilin/kafkian/blob/master/kafkian/serde/serialization.py#L48
all strategy has -key or -value suffix (subject += '-key' if is_key else '-value'). These suffix should be applied only on TopicNameStrategy.

Anyway, I feel confluent-kafka-python is not user-friendly and does not support Subject Name Strategy well.
Thank you for your nice library!

README example gives error

What is the way to instantiate user in the README example? It gives error:

$ python3 produce.py 
Traceback (most recent call last):
  File "produce.py", line 48, in <module>
    user.uuid,
NameError: name 'user' is not defined

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.