pulsarsdk

package
v0.0.0-...-8639602 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2022 License: BSL-1.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Closed

func Closed()

func GetSrcConsumer

func GetSrcConsumer(con *Consumer) pulsar.Consumer

func Init

func Init(option pulsar.ClientOptions, subscribePoolSize int) (err error)

func SubscribeMsg

func SubscribeMsg(ctx context.Context, topic string, callBack SubscribeCallBack)

Types

type Client

type Client struct {
	pulsar.Client
	// contains filtered or unexported fields
}

func GetClient

func GetClient() *Client

type Consumer

type Consumer struct {
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer(topic string) (con *Consumer, err error)

type Producer

type Producer struct {
	// contains filtered or unexported fields
}

func NewProducer

func NewProducer(topic string, sendTimeout int) (prod *Producer, err error)

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

type SubscribeCallBack func(message pulsar.Message, err error)

Jump to

Keyboard shortcuts

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