mq

package
v0.1.29 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(userName, password, address string)

func Producer

func Producer(queueName string, request []byte) error

worker模式

func Publish

func Publish(exchangeName string, request []byte) error

fanout,广播模式 开启持久化

func RPCClient

func RPCClient(queueName string, request []byte) (reply []byte, err error)

RPC模式

func RPCServer

func RPCServer(queueName string, f func([]byte) []byte)

func Receive

func Receive(QueueName string) (<-chan amqp.Delivery, error)

func RouteConsume

func RouteConsume(exchangeName, key string) (<-chan amqp.Delivery, error)

func RoutePublish

func RoutePublish(exchangeName, key string, request []byte) error

路由模式 关闭持久化

func Send

func Send(QueueName string, request []byte) error

普通模式 支持持久化

func Subscribe

func Subscribe(exchangeName string) (<-chan amqp.Delivery, error)

func Worker

func Worker(queueName string) (<-chan amqp.Delivery, error)

worker使用时,必须手动ack

Types

This section is empty.

Jump to

Keyboard shortcuts

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