rocketmq

package
v1.13.0-rc.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RocketMQ

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

func NewRocketMQ

func NewRocketMQ(l logger.Logger) *RocketMQ

func (*RocketMQ) Close

func (a *RocketMQ) Close() error

Close implements cancel all listeners, see https://github.com/dapr/components-contrib/issues/779

func (*RocketMQ) Init

func (a *RocketMQ) Init(ctx context.Context, metadata bindings.Metadata) error

Init performs metadata parsing.

func (*RocketMQ) Invoke

func (*RocketMQ) Operations

func (a *RocketMQ) Operations() []bindings.OperationKind

Operations returns list of operations supported by rocketmq binding.

func (*RocketMQ) Read

func (a *RocketMQ) Read(ctx context.Context, handler bindings.Handler) error

Read triggers the rocketmq subscription.

type Settings

type Settings struct {
	// sdk proto (tcp, tcp-cgo,http)
	AccessProto string `mapstructure:"accessProto"`
	// rocketmq Credentials
	AccessKey string `mapstructure:"accessKey"`
	// rocketmq Credentials
	SecretKey string `mapstructure:"secretKey"`
	// rocketmq's name server, optional
	NameServer string `mapstructure:"nameServer"`
	// rocketmq's endpoint, optional, just for http proto
	Endpoint string `mapstructure:"endpoint"`
	// consumer group for rocketmq's subscribers, suggested to provide
	ConsumerGroup string `mapstructure:"consumerGroup"`
	// consumer group for rocketmq's subscribers, suggested to provide
	ConsumerBatchSize int `mapstructure:"consumerBatchSize,string"`
	// consumer group for rocketmq's subscribers, suggested to provide, just for tcp-cgo proto
	ConsumerThreadNums int `mapstructure:"consumerThreadNums,string"`
	// rocketmq's namespace, optional
	InstanceID string `mapstructure:"instanceId"`
	// rocketmq's name server domain, optional
	NameServerDomain string `mapstructure:"nameServerDomain"`
	// retry times to connect rocketmq's broker, optional
	Retries int `mapstructure:"retries,string"`
	// topics to subscribe, use delimiter ',' to separate if more than one topics are configured, optional
	Topics TopicsDelimited `mapstructure:"topics"`
}

func (*Settings) Decode

func (s *Settings) Decode(in interface{}) error

func (*Settings) ToRocketMQMetadata

func (s *Settings) ToRocketMQMetadata() *rocketmq.Metadata

type TopicsDelimited

type TopicsDelimited []string

func (*TopicsDelimited) DecodeString

func (t *TopicsDelimited) DecodeString(value string) error

func (*TopicsDelimited) ToString

func (t *TopicsDelimited) ToString() string

Jump to

Keyboard shortcuts

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