consumer

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PushConsumer

type PushConsumer struct {
	rocketmq.PushConsumer
	Logger baselogger.RocketmqLogger
}

func NewPushConsumer

func NewPushConsumer(opts ...*PushConsumerOption) (*PushConsumer, error)

type PushConsumerOption

type PushConsumerOption struct {
	GroupName    string
	InstanceName string // 访问多个rocketmq集群才需要设置
	NameServer   string // TCP接入点
	AccessKey    string
	SecretKey    string
	Namespace    string
	// 	BroadCasting
	// 	Clustering
	ConsumerModel string
	// 	lastoffset
	// 	firstoffset
	// 	timestamp
	ConsumeFromWhere           string
	ConsumeOrderly             bool
	ConsumeMessageBatchMaxSize int
	PullBatchSize              int
	AllocateStrategy           consumer.AllocateStrategy
	RetryTimes                 int
	Interceptors               []primitive.Interceptor
	AutoCommit                 bool
	Logger                     baselogger.RocketmqLogger
	LogLevel                   string
}

func ConfigPushConsumerOption

func ConfigPushConsumerOption(key string) (option *PushConsumerOption, err error)

RawConfig ...

func NewPushConsumerOption

func NewPushConsumerOption() *PushConsumerOption

func PushConsumerAddInterceptor

func PushConsumerAddInterceptor(f ...primitive.Interceptor) *PushConsumerOption

func PushConsumerSetAccessKey

func PushConsumerSetAccessKey(l string) *PushConsumerOption

func PushConsumerSetAllocateStrategy

func PushConsumerSetAllocateStrategy(a consumer.AllocateStrategy) *PushConsumerOption

func PushConsumerSetAutoCommit

func PushConsumerSetAutoCommit(l bool) *PushConsumerOption

func PushConsumerSetConsumeFromWhere

func PushConsumerSetConsumeFromWhere(l string) *PushConsumerOption

func PushConsumerSetConsumeMessageBatchMaxSize

func PushConsumerSetConsumeMessageBatchMaxSize(l int) *PushConsumerOption

func PushConsumerSetConsumeOrderly

func PushConsumerSetConsumeOrderly(l bool) *PushConsumerOption

func PushConsumerSetConsumerModel

func PushConsumerSetConsumerModel(l string) *PushConsumerOption

func PushConsumerSetGroupName

func PushConsumerSetGroupName(l string) *PushConsumerOption

func PushConsumerSetInstanceName

func PushConsumerSetInstanceName(l string) *PushConsumerOption

func PushConsumerSetLogLevel

func PushConsumerSetLogLevel(l string) *PushConsumerOption

func PushConsumerSetNameServer

func PushConsumerSetNameServer(l string) *PushConsumerOption

func PushConsumerSetNamespace

func PushConsumerSetNamespace(l string) *PushConsumerOption

func PushConsumerSetPullBatchSize

func PushConsumerSetPullBatchSize(l int) *PushConsumerOption

func PushConsumerSetRetryTimes

func PushConsumerSetRetryTimes(l int) *PushConsumerOption

func PushConsumerSetSecretKey

func PushConsumerSetSecretKey(l string) *PushConsumerOption

func (*PushConsumerOption) AddInterceptor

func (*PushConsumerOption) MergeOption

func (c *PushConsumerOption) MergeOption(opts ...*PushConsumerOption) *PushConsumerOption

func (*PushConsumerOption) PushConsumerSetLogLevel

func (c *PushConsumerOption) PushConsumerSetLogLevel(l string) *PushConsumerOption

func (*PushConsumerOption) SetAccessKey

func (c *PushConsumerOption) SetAccessKey(l string) *PushConsumerOption

func (*PushConsumerOption) SetAllocateStrategy

func (*PushConsumerOption) SetAutoCommit

func (c *PushConsumerOption) SetAutoCommit(l bool) *PushConsumerOption

func (*PushConsumerOption) SetConsumeFromWhere

func (c *PushConsumerOption) SetConsumeFromWhere(l string) *PushConsumerOption

func (*PushConsumerOption) SetConsumeMessageBatchMaxSize

func (c *PushConsumerOption) SetConsumeMessageBatchMaxSize(l int) *PushConsumerOption

func (*PushConsumerOption) SetConsumeOrderly

func (c *PushConsumerOption) SetConsumeOrderly(l bool) *PushConsumerOption

func (*PushConsumerOption) SetConsumerModel

func (c *PushConsumerOption) SetConsumerModel(l string) *PushConsumerOption

func (*PushConsumerOption) SetGroupName

func (c *PushConsumerOption) SetGroupName(l string) *PushConsumerOption

func (*PushConsumerOption) SetInstanceName

func (c *PushConsumerOption) SetInstanceName(l string) *PushConsumerOption

func (*PushConsumerOption) SetLogger

func (*PushConsumerOption) SetNameServer

func (c *PushConsumerOption) SetNameServer(l string) *PushConsumerOption

func (*PushConsumerOption) SetNamespace

func (c *PushConsumerOption) SetNamespace(l string) *PushConsumerOption

func (*PushConsumerOption) SetPullBatchSize

func (c *PushConsumerOption) SetPullBatchSize(l int) *PushConsumerOption

func (*PushConsumerOption) SetRetryTimes

func (c *PushConsumerOption) SetRetryTimes(l int) *PushConsumerOption

func (*PushConsumerOption) SetSecretKey

func (c *PushConsumerOption) SetSecretKey(l string) *PushConsumerOption

Jump to

Keyboard shortcuts

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