kafka

package
v2.0.72 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BusServiceImpl

type BusServiceImpl struct {
	ioc.ObjectImpl

	Group string `toml:"group" json:"group" yaml:"group"  env:"GROUP"`

	sync.Mutex
	// contains filtered or unexported fields
}

func (*BusServiceImpl) Close

func (b *BusServiceImpl) Close(ctx context.Context)

func (*BusServiceImpl) GetConsumer

func (b *BusServiceImpl) GetConsumer(group, topic string) *kafka.Reader

func (*BusServiceImpl) GetProducer

func (b *BusServiceImpl) GetProducer(topic string) *kafka.Writer

func (*BusServiceImpl) Init

func (b *BusServiceImpl) Init() error

func (*BusServiceImpl) Name

func (b *BusServiceImpl) Name() string

func (*BusServiceImpl) Priority added in v2.0.72

func (i *BusServiceImpl) Priority() int

func (*BusServiceImpl) Publish

func (b *BusServiceImpl) Publish(ctx context.Context, e *bus.Event) error

事件发送

func (*BusServiceImpl) QueueSubscribe added in v2.0.70

func (b *BusServiceImpl) QueueSubscribe(ctx context.Context, subject string, cb bus.EventHandler) error

订阅队列

func (*BusServiceImpl) TopicSubscribe added in v2.0.70

func (b *BusServiceImpl) TopicSubscribe(ctx context.Context, subject string, cb bus.EventHandler) error

订阅事件

Jump to

Keyboard shortcuts

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