Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Pool map[string]*Entity
)
Functions ¶
Types ¶
type Config ¶
type Config struct { BrokerList []string ConsumerConf *ConsumerConf ProducerConf *ProducerConf }
type ConsumerConf ¶
type Entity ¶
type Entity struct { ConnName string SaramaClient sarama.Client SaramaConfig *sarama.Config ErrChan chan error MsgChan chan string }
func (*Entity) ConsumeWithGroup ¶
* 使用消费组进行消费, 可以消费 多个topic 和 多个partition
func (*Entity) ConsumeWithHander ¶
func (*Entity) SyncProduce ¶
func (c *Entity) SyncProduce(message *sarama.ProducerMessage) error
type ProducerConf ¶
Click to show internal directories.
Click to hide internal directories.