All Projects → optiopay → Kafka

optiopay / Kafka

Licence: mit
Go driver for Kafka

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Kafka

Kafka Streams Machine Learning Examples
This project contains examples which demonstrate how to deploy analytic models to mission-critical, scalable production environments leveraging Apache Kafka and its Streams API. Models are built with Python, H2O, TensorFlow, Keras, DeepLearning4 and other technologies.
Stars: ✭ 661 (+211.79%)
Mutual labels:  kafka, open-source
Kafka Ui
Open-Source Web GUI for Apache Kafka Management
Stars: ✭ 230 (+8.49%)
Mutual labels:  kafka, open-source
Ksql Udf Deep Learning Mqtt Iot
Deep Learning UDF for KSQL for Streaming Anomaly Detection of MQTT IoT Sensor Data
Stars: ✭ 219 (+3.3%)
Mutual labels:  kafka, open-source
Sitewhere
SiteWhere is an industrial strength open-source application enablement platform for the Internet of Things (IoT). It provides a multi-tenant microservice-based infrastructure that includes device/asset management, data ingestion, big-data storage, and integration through a modern, scalable architecture. SiteWhere provides REST APIs for all system functionality. SiteWhere provides SDKs for many common device platforms including Android, iOS, Arduino, and any Java-capable platform such as Raspberry Pi rapidly accelerating the speed of innovation.
Stars: ✭ 788 (+271.7%)
Mutual labels:  kafka, open-source
Fireshock
Windows USB Driver for Sony DualShock 3 Controllers
Stars: ✭ 206 (-2.83%)
Mutual labels:  driver
Thunder
⚡️ Nepxion Thunder is a distribution RPC framework based on Netty + Hessian + Kafka + ActiveMQ + Tibco + Zookeeper + Redis + Spring Web MVC + Spring Boot + Docker 多协议、多组件、多序列化的分布式RPC调用框架
Stars: ✭ 204 (-3.77%)
Mutual labels:  kafka
Tech Blog
我的个人技术博客(Python、Django、Docker、Go、Redis、ElasticSearch、Kafka、Linux)
Stars: ✭ 203 (-4.25%)
Mutual labels:  kafka
Choosealicense.com
A site to provide non-judgmental guidance on choosing a license for your open source project
Stars: ✭ 2,648 (+1149.06%)
Mutual labels:  open-source
Openui5
OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
Stars: ✭ 2,542 (+1099.06%)
Mutual labels:  open-source
Kafka Client
Go client library for Apache Kafka
Stars: ✭ 210 (-0.94%)
Mutual labels:  kafka
One Html Page Challenge
Can you create something cool without modern tools?
Stars: ✭ 205 (-3.3%)
Mutual labels:  open-source
Vulkan Renderer
A new 3D game engine using modern C++ and Vulkan API
Stars: ✭ 205 (-3.3%)
Mutual labels:  open-source
Pos
Sample Application DDD, Reactive Microservices, CQRS Event Sourcing Powered by DERMAYON LIBRARY
Stars: ✭ 207 (-2.36%)
Mutual labels:  kafka
Bolt sips
Neo4j driver for Elixir
Stars: ✭ 204 (-3.77%)
Mutual labels:  driver
Opensourceresources
Free opensource Learning Resources related to Web-Development A to Z 🔥❤
Stars: ✭ 210 (-0.94%)
Mutual labels:  open-source
Hivemq Mqtt Tensorflow Kafka Realtime Iot Machine Learning Training Inference
Real Time Big Data / IoT Machine Learning (Model Training and Inference) with HiveMQ (MQTT), TensorFlow IO and Apache Kafka - no additional data store like S3, HDFS or Spark required
Stars: ✭ 204 (-3.77%)
Mutual labels:  kafka
Code Samples
Just some code samples for MahApps and other experiments...
Stars: ✭ 205 (-3.3%)
Mutual labels:  open-source
Jetson Nano Baseboard
Antmicro's open hardware baseboard for the NVIDIA Jetson Nano and Jetson Xavier NX
Stars: ✭ 209 (-1.42%)
Mutual labels:  open-source
Kap
An open-source screen recorder built with web technology
Stars: ✭ 14,488 (+6733.96%)
Mutual labels:  open-source
Android
📱 Nextcloud Android app
Stars: ✭ 2,669 (+1158.96%)
Mutual labels:  open-source

Tests status GoDoc

Kafka

Kafka is Go client library for Apache Kafka server, released under MIT license.

Kafka provides minimal abstraction over wire protocol, support for transparent failover and easy to use blocking API.

Example

Write all messages from stdin to kafka and print all messages from kafka topic to stdout.

package main

import (
    "bufio"
    "log"
    "os"
    "strings"

    "github.com/optiopay/kafka/v2"
    "github.com/optiopay/kafka/v2/proto"
)

const (
    topic     = "my-messages"
    partition = 0
)

var kafkaAddrs = []string{"localhost:9092", "localhost:9093"}

// printConsumed read messages from kafka and print them out
func printConsumed(broker kafka.Client) {
    conf := kafka.NewConsumerConf(topic, partition)
    conf.StartOffset = kafka.StartOffsetNewest
    consumer, err := broker.Consumer(conf)
    if err != nil {
        log.Fatalf("cannot create kafka consumer for %s:%d: %s", topic, partition, err)
    }

    for {
        msg, err := consumer.Consume()
        if err != nil {
            if err != kafka.ErrNoData {
                log.Printf("cannot consume %q topic message: %s", topic, err)
            }
            break
        }
        log.Printf("message %d: %s", msg.Offset, msg.Value)
    }
    log.Print("consumer quit")
}

// produceStdin read stdin and send every non empty line as message
func produceStdin(broker kafka.Client) {
    producer := broker.Producer(kafka.NewProducerConf())
    input := bufio.NewReader(os.Stdin)
    for {
        line, err := input.ReadString('\n')
        if err != nil {
            log.Fatalf("input error: %s", err)
        }
        line = strings.TrimSpace(line)
        if line == "" {
            continue
        }

        msg := &proto.Message{Value: []byte(line)}
        if _, err := producer.Produce(topic, partition, msg); err != nil {
            log.Fatalf("cannot produce message to %s:%d: %s", topic, partition, err)
        }
    }
}

func main() {
    conf := kafka.NewBrokerConf("test-client")
    conf.AllowTopicCreation = true

    // connect to kafka cluster
    broker, err := kafka.Dial(kafkaAddrs, conf)
    if err != nil {
        log.Fatalf("cannot connect to kafka cluster: %s", err)
    }
    defer broker.Close()

    go printConsumed(broker)
    produceStdin(broker)
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].