Documentation ¶
Index ¶
Constants ¶
View Source
const ( WORKER_ADDRESS_EXPIRE = 60 //60秒重新取worker address PULL_OFFLINE_WORKER_MSG_NUM_EVERY_TIME = 500 //每次拉取下线worker消息个数 MAX_REQ_CNT = 3 //每个消息请求worker最大次数 )
Variables ¶
This section is empty.
Functions ¶
func InitKafkaConf ¶
func InitKafkaConf(brokerList string, topicPrefix string) *entity.KafkaConfig
Types ¶
type CenterConsumer ¶
type CenterConsumer struct { }
func (*CenterConsumer) ConsumerDelayMsg ¶
延时消息消费
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func (*Consumer) ConsumeClaim ¶
func (consumer *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
type ICenterService ¶
type ICenterService interface { Start() Stop() // contains filtered or unexported methods }
var CenterService ICenterService
func NewCenterService ¶
func NewCenterService(brokerList string, topicPrefix string, rpcPort int64, centerIp string) ICenterService
Click to show internal directories.
Click to hide internal directories.