rocketmq

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2020 License: Apache-2.0 Imports: 10 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerConfig

type ConsumerConfig struct {
	Enable          bool          `json:"enable" toml:"enable"`
	Addr            []string      `json:"addr" toml:"addr"`
	Topic           string        `json:"topic" toml:"topic"`
	Group           string        `json:"group" toml:"group"`
	DialTimeout     time.Duration `json:"dialTimeout" toml:"dialTimeout"`
	RwTimeout       time.Duration `json:"rwTimeout" toml:"rwTimeout"`
	SubExpression   string        `json:"subExpression" toml:"subExpression"`
	Rate            float64       `json:"rate" toml:"rate"`
	Capacity        int64         `json:"capacity" toml:"capacity"`
	WaitMaxDuration time.Duration `json:"waitMaxDuration" toml:"waitMaxDuration"`
	// contains filtered or unexported fields
}

ConsumerConfig consumer config

func DefaultConsumerConfig

func DefaultConsumerConfig() ConsumerConfig

DefaultConsumerConfig ...

func RawConsumerConfig

func RawConsumerConfig(key string) ConsumerConfig

RawConsumerConfig 返回配置

func StdPushConsumerConfig

func StdPushConsumerConfig(name string) ConsumerConfig

StdPushConsumerConfig ...

func (*ConsumerConfig) Build

func (config *ConsumerConfig) Build() (rocketmq.PushConsumer, error)

Build ...

func (*ConsumerConfig) WithInterceptor

func (config *ConsumerConfig) WithInterceptor(fs ...primitive.Interceptor) *ConsumerConfig

WithInterceptor ...

func (*ConsumerConfig) WithSubscribe

func (config *ConsumerConfig) WithSubscribe(topic string, f func(context.Context, *primitive.MessageExt) error) *ConsumerConfig

WithSubscribe ...

type ProducerConfig

type ProducerConfig struct {
	Addr        []string      `json:"addr" toml:"addr"`
	Topic       string        `json:"topic" toml:"topic"`
	Group       string        `json:"group" toml:"group"`
	Retry       int           `json:"retry" toml:"retry"`
	DialTimeout time.Duration `json:"dialTimeout" toml:"dialTimeout"`
	RwTimeout   time.Duration `json:"rwTimeout" toml:"rwTimeout"`
	// contains filtered or unexported fields
}

ProducerConfig producer config

func DefaultProducerConfig

func DefaultProducerConfig() ProducerConfig

DefaultProducerConfig ...

func RawProducerConfig

func RawProducerConfig(key string) ProducerConfig

RawProducerConfig ...

func StdProducerConfig

func StdProducerConfig(name string) ProducerConfig

StdProducerConfig ...

func (ProducerConfig) Build

func (config ProducerConfig) Build() (rocketmq.Producer, error)

Build ...

func (*ProducerConfig) WithInterceptor

func (config *ProducerConfig) WithInterceptor(fs ...primitive.Interceptor) *ProducerConfig

WithInterceptor ...

Jump to

Keyboard shortcuts

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