topic

package
v1.0.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DataBase = "beowl_mns"
	RetryC   = "retry"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type MNSTopic

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

func NewMNSTopic

func NewMNSTopic(c *config.MNSConfig) *MNSTopic

func (*MNSTopic) Addretry

func (this *MNSTopic) Addretry(data string)

func (*MNSTopic) Retry

func (this *MNSTopic) Retry(retryTimes int, callback func() error)

重试

func (*MNSTopic) SendMessage

func (this *MNSTopic) SendMessage(messageBody bson.M) (ali_mns.MessageSendResponse, error)

发送消息到主题

type Retry

type Retry struct {
	Id         string `json:"id" bson:"_id" comment:"id"`
	RetryNum   int    `json:"retry_num" bson:"retry_num" comment:"重试次数"`
	IsDone     int    `json:"is_done" bson:"is_done" comment:"是否重试完毕 0:否 1:是"`
	IsSucc     int    `json:"is_succ" bson:"is_succ" comment:"是否发送队列成功 0:否 1:是"`
	Data       string `json:"data" bson:"data" comment:"入列数据"`
	UpdateTime int64  `json:"update_time" bson:"update_time" comment:"更新时间"`
}

Jump to

Keyboard shortcuts

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