kafgo

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const CONSUME_TOTAL_MESSAGE_NUM int32 = 200

const CONSUME_ONE_PARTITION int = 10

View Source
const OFFSET_INIT string = "oldest"

Variables

View Source
var Broker *kafka.Broker
View Source
var TopicPartition map[string]int32 = make(map[string]int32)

记录每个topic分区的大小

Functions

func GetKafkaBroker

func GetKafkaBroker() ([]proto.MetadataRespBroker, int32)

get kafka broker list and controller id

func GetKafkaMsg

func GetKafkaMsg(topic string) (map[int32][]*proto.Message, int32)

get kafka topic msg

func GetKafkaTopic

func GetKafkaTopic() []proto.MetadataRespTopic

get kafka topic list

func GetTopicMsgNum

func GetTopicMsgNum(topic string, partitionSize int32) int64

get topic available msg count

Types

This section is empty.

Jump to

Keyboard shortcuts

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