portableMq

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

golang+redis 简单版mq ,有ack功能

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetJob

func GetJob(name string) (*job, error)

func NewJob

func NewJob(name, persistentPath string, num int64, conn *radix.Pool, handler handlerFn) *job

example:

job := mq.NewJob("test", "/fail-queue.json", 1, redis.GetPool(), func(message mq.Message) bool {
	data := message.Data
	fmt.Println(data)
	return true
})

Types

type Message

type Message struct {
	Id   string
	Data interface{}
}

Jump to

Keyboard shortcuts

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