Documentation ¶
Index ¶
- func Closed()
- func GetSrcConsumer(con *Consumer) pulsar.Consumer
- func Init(option pulsar.ClientOptions, subscribePoolSize int) (err error)
- func SubscribeMsg(ctx context.Context, topic string, callBack SubscribeCallBack)
- type Client
- type Consumer
- type Producer
- type ProductCallBack
- type SubscribeCallBack
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetSrcConsumer ¶
func SubscribeMsg ¶
func SubscribeMsg(ctx context.Context, topic string, callBack SubscribeCallBack)
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
func (*Producer) ProductMsg ¶
func (p *Producer) ProductMsg(ctx context.Context, msg []byte, callBack ProductCallBack)
生产消息
type ProductCallBack ¶
type ProductCallBack func(id pulsar.MessageID, message *pulsar.ProducerMessage, callBackErr error)
type SubscribeCallBack ¶
Click to show internal directories.
Click to hide internal directories.