nsqx

package module
v0.0.0-...-91aa13a Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	USER_AGENT = "go agent v0.1"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Producer

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

func NewProducer

func NewProducer(nsqdTcpAddr string) *Producer

func (*Producer) Publish

func (p *Producer) Publish(topic string, msg []byte) error

type TopicDiscoverer

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

func NewTopicDiscoverer

func NewTopicDiscoverer(topics []string, channel string, maxInFlight int, lookupdHTTPAddrs []string, handle func(string, interface{})) *TopicDiscoverer

NewTopicDiscoverer 生成多个主题发现的消费者 topics 订阅主题列表 channel channel名称 maxInFlight NSQD在有maxInFlight*25条消息时向下推送 lookupdHTTPAddrs NSQLOOKUPs的http地址 handle 消息处理句柄 PS:对channel不同的topic应该生成不同的消费者

Jump to

Keyboard shortcuts

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