rabbitmq

package
v0.0.0-...-e1367df Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(addr string, vHost string, connName string, heartbeat time.Duration) *client

Types

type Consumer

type Consumer struct {
	HandlerFunc func([]byte) bool
	// contains filtered or unexported fields
}

func NewConsumer

func NewConsumer(exchangeName, queueName, routingKey, connName string, handlerFunc func([]byte) bool) (*Consumer, error)

func (*Consumer) Close

func (c *Consumer) Close() error

func (*Consumer) Subscribe

func (c *Consumer) Subscribe() error

type Producer

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

func NewProducer

func NewProducer(connName string) (*Producer, error)

func (*Producer) Close

func (p *Producer) Close() error

func (Producer) Publish

func (p Producer) Publish(message interface{}, exchangeName string, routingKey string) error

发布消息

func (Producer) PublishDelay

func (p Producer) PublishDelay(message interface{}, exchangeName string, routingKey string, delay int) error

发布延时消息 delay 毫秒

Jump to

Keyboard shortcuts

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