rocketmq

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 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 AliCloudRocketMQ

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

func NewAliCloudRocketMQ

func NewAliCloudRocketMQ(l logger.Logger) *AliCloudRocketMQ

func (*AliCloudRocketMQ) Close

func (a *AliCloudRocketMQ) Close() error

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

func (*AliCloudRocketMQ) Init

func (a *AliCloudRocketMQ) Init(metadata bindings.Metadata) error

Init performs metadata parsing.

func (*AliCloudRocketMQ) Invoke

func (*AliCloudRocketMQ) Operations

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

Operations returns list of operations supported by rocketmq binding.

func (*AliCloudRocketMQ) Read

func (a *AliCloudRocketMQ) Read(handler func(*bindings.ReadResponse) ([]byte, error)) 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