mth_pulsar

package
v0.20.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 Message

type Message struct {
	Msg pulsar.Message
}

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) Send

func (pc *PulsarClient) Send(topic string, msg string) error

func (*PulsarClient) SendAsync

func (pc *PulsarClient) SendAsync(topic string, msg string) error

func (*PulsarClient) SendDelay

func (pc *PulsarClient) SendDelay(topic string, msg string, delay time.Duration) error

func (*PulsarClient) SendDelayAsync

func (pc *PulsarClient) SendDelayAsync(topic string, msg string, delay time.Duration) error

func (*PulsarClient) SendDelayAt

func (pc *PulsarClient) SendDelayAt(topic string, msg string, delayAt time.Time) error

func (*PulsarClient) SendDelayAtAsync

func (pc *PulsarClient) SendDelayAtAsync(topic string, msg string, delayAt time.Time) error

func (*PulsarClient) Subscribe

func (pc *PulsarClient) Subscribe(opts ConsumerOptions)

Jump to

Keyboard shortcuts

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