rocketmq

package
v0.0.0-...-977fba5 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package rocketmq Message queue adapter on RocketMQ.

Index

Constants

View Source
const (
	DefaultConsumerGroupName      = "GID"
	DefaultProducerGroupName      = "GmdProducers"
	DefaultConsumeSuspendDuration = time.Millisecond * 10
	DefaultReconsumeTimes         = 5

	DefaultDelayTagPrefix    = "GMD-DELAY-"
	DefaultDelayMessageTime  = "GMD_DELAY_MESSAGE_TIME"
	DefaultDelayPublishCount = "GMD_DELAY_PUBLISH_COUNT"
	DefaultTopicMessageId    = "GMD_TOPIC_MESSAGE_ID"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AgentManager

type AgentManager interface {
	// GenGroupName
	// return subscription group name.
	//
	//   return "X-GID-1"
	GenGroupName(id int) string

	// GenTopicName
	// return topic name.
	//
	//   return "X-TOPIC"
	GenTopicName(name string) string
}
var (
	Agent AgentManager
)

type Consumer

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

func NewConsumer

func NewConsumer(id, parallel int) *Consumer

func (*Consumer) Dispatcher

func (o *Consumer) Dispatcher(x func(*base.Task, *base.Message) bool)

func (*Consumer) Processor

func (o *Consumer) Processor() process.Processor

type Producer

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

func NewProducer

func NewProducer() *Producer

func (*Producer) Processor

func (o *Producer) Processor() process.Processor

func (*Producer) Publish

func (o *Producer) Publish(p *base.Payload) (string, error)

type Received

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

func (*Received) Consume

Consume main process for received message.

func (*Received) IsIdle

func (o *Received) IsIdle() bool

IsIdle return all delivering messages are completed or not.

type Remoter

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

Remoter struct for aliyun mns remoter.

func NewRemoter

func NewRemoter() *Remoter

func (*Remoter) Build

func (o *Remoter) Build(_ context.Context, _ *base.Task) (err error)

func (*Remoter) BuildById

func (o *Remoter) BuildById(_ context.Context, _ int) (err error)

func (*Remoter) Destroy

func (o *Remoter) Destroy(_ context.Context, _ *base.Task) (err error)

func (*Remoter) DestroyById

func (o *Remoter) DestroyById(_ context.Context, _ int) (err error)

func (*Remoter) Processor

func (o *Remoter) Processor() process.Processor

Jump to

Keyboard shortcuts

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