kafka

package
v0.0.0-...-46f0560 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewProducerConfig

func NewProducerConfig() *sarama.Config

Types

type Producer

type Producer struct {
	sarama.SyncProducer
	// contains filtered or unexported fields
}

func NewProducer

func NewProducer(brokers []string, config *sarama.Config) (*Producer, error)

func (*Producer) Close

func (k *Producer) Close() error

type RequestMessage

type RequestMessage struct {
	Type      int    `json:"type"`
	CompanyId int    `json:"companyId"`
	Price     int    `json:"price"`
	DateTime  string `json:"datetime"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL