Documentation
¶
Index ¶
- Constants
- type ConsumerOptions
- type Message
- type PulsarClient
- func (pc *PulsarClient) Close()
- func (pc *PulsarClient) Send(topic string, msg string) error
- func (pc *PulsarClient) SendAsync(topic string, msg string) error
- func (pc *PulsarClient) SendDelay(topic string, msg string, delay time.Duration) error
- func (pc *PulsarClient) SendDelayAsync(topic string, msg string, delay time.Duration) error
- func (pc *PulsarClient) SendDelayAt(topic string, msg string, delayAt time.Time) error
- func (pc *PulsarClient) SendDelayAtAsync(topic string, msg string, delayAt time.Time) error
- func (pc *PulsarClient) Subscribe(opts ConsumerOptions)
Constants ¶
View Source
const (
MAX_RETRY_TIMES = 50
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerOptions ¶
type ConsumerOptions struct {
Topic string
SubscriptionName string
SubscriptionType pulsar.SubscriptionType
MessageListener func(baseConsumer.Message) error
ACKMode uint32
RetryTimes uint32
}
type PulsarClient ¶
type PulsarClient struct {
// contains filtered or unexported fields
}
func InitClient ¶
func InitClient(url string, connectionTimeoutSecond int64, operationTimeoutSecond int64, name string) *PulsarClient
func NewClient ¶
func NewClient(url string, connectionTimeoutSecond int64, operationTimeoutSecond int64, appName string) *PulsarClient
func (*PulsarClient) Close ¶
func (pc *PulsarClient) Close()
func (*PulsarClient) SendDelayAsync ¶
func (*PulsarClient) SendDelayAt ¶
func (*PulsarClient) SendDelayAtAsync ¶
func (*PulsarClient) Subscribe ¶
func (pc *PulsarClient) Subscribe(opts ConsumerOptions)
Click to show internal directories.
Click to hide internal directories.