rocketmq

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Admin

func Admin() (admin.Admin, error)

Admin returns the default RocketMQ admin instance

func Close

func Close()

Close closes the RocketMQ producer connection

func Consumer

func Consumer() (rocketmq.PushConsumer, error)

Consumer returns the default RocketMQ consumer instance

func Init

func Init() (err error)

Init initializes the global RocketMQ producer. It reads RocketMQ configuration from config.App.RocketMQ. If RocketMQ is not enabled, it returns nil. The function is thread-safe and ensures the producer is initialized only once.

func NewAdmin

func NewAdmin(cfg config.RocketMQ) (admin.Admin, error)

NewAdmin returns a new RocketMQ admin with given configuration. It's the caller's responsibility to close the admin when it's no longer needed.

func NewProducer

func NewProducer(cfg config.RocketMQ) (rocketmq.Producer, error)

NewProducer returns a new RocketMQ producer with given configuration. It's the caller's responsibility to start and shutdown the producer.

func NewPushConsumer

func NewPushConsumer(cfg config.RocketMQ, consumerGroup string) (rocketmq.PushConsumer, error)

NewConsumer returns a new RocketMQ push consumer with given configuration. It's the caller's responsibility to start and shutdown the consumer.

func Producer

func Producer() (rocketmq.Producer, error)

Producer returns the default RocketMQ producer instance

Types

This section is empty.

Jump to

Keyboard shortcuts

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