pulsar

package
v0.0.0-...-d5b0b98 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 1 more Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func KeyConsumer

func KeyConsumer(topic, subName string) string

KeyConsumer assembly consumer key

Types

type Consumer

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

Consumer is a consumer of Pulsar

func (*Consumer) ProcessMessage

func (s *Consumer) ProcessMessage(topic string, msg pulsar.Message) error

ProcessMessage processing message

type EventType

type EventType int
const (
	EventTypeProcessor EventType = 1
	EventTypeDelay     EventType = 2
)

type Pulsar

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

Pulsar is a type of connector

func New

func New(opts *options.Options, c *options.PulsarConfig, handler *handler.Handler) (*Pulsar, error)

New creates a Pulsar connector

func (*Pulsar) ConsumerDelayTopic

func (s *Pulsar) ConsumerDelayTopic(confInfoList []*cc.ProducerConfInfo)

ConsumerDelayTopic is the subject of the subscription latency processor

func (*Pulsar) ConsumerProcessorTopic

func (s *Pulsar) ConsumerProcessorTopic(confInfoList []*cc.ProcessorConfInfo)

ConsumerProcessorTopic is the topic of the subscription processor

func (*Pulsar) Stop

func (s *Pulsar) Stop() error

Stop stops the Pulsar connector gracefully.

func (*Pulsar) WatchDelayTopic

func (s *Pulsar) WatchDelayTopic(c *cc.ProducerConfInfo, eventType int32) error

WatchDelayTopic watch the topic of the latency processor

func (*Pulsar) WatchProcessorTopic

func (s *Pulsar) WatchProcessorTopic(c *cc.ProcessorConfInfo, eventType int32) error

WatchProcessorTopic watch the topic of the processor

Jump to

Keyboard shortcuts

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