Categorygithub.com/asim/go-micro/plugins/broker/kafka/v4
modulepackage
4.7.0
Repository: https://github.com/asim/go-micro.git
Documentation: pkg.go.dev

# README

Kafka Broker

Async Publish

import "github.com/Shopify/sarama"

func AsyncProduceMessage()  {
    var errorsChan = make(chan *sarama.ProducerError)
    var successesChan = make(chan *sarama.ProducerMessage)
    go func() {
        for err := range errorsChan {
            fmt.Println(err)
        }
    }
    go func() {
        for v := range successesChan {
            fmt.Println(v)
        }
    }
    b := NewBroker(AsyncProducer(errorsChan,successesChan))
    b.Publish(`topic`, &broker.Message{})
}

# Functions

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SubscribeContext set the context for broker.SubscribeOption.

# Variables

No description provided by the author
No description provided by the author