pulsar

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SERVER_URL_KEY         = "pulsar.service-url"
	CONNECTION_TIMEOUT_KEY = "pulsar.connectionTimeout"
	OPERATION_TIMEOUT_KEY  = "pulsar.operationTimeout"
)
View Source
const (
	MAX_RETRY_TIMES = 50
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(url string, connectionTimeoutSecond int64, operationTimeoutSecond int64, appName string) mq.IClient

Types

type Message

type Message struct {
	Msg pulsar.Message
}

type PulsarClient

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

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 mq.ConsumerOptions)

func (*PulsarClient) Subscribes

func (pc *PulsarClient) Subscribes(opts ...mq.ConsumerOptions)

Jump to

Keyboard shortcuts

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