message_queue

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Publish

func Publish(messageQueue common.MessageQueue, topic string, data string) error

Publish 发布消息 参数: - queue: 消息队列 - topic: 主题 - data: 消息数据 返回值: - 错误

func Subscribe

func Subscribe(messageQueue common.MessageQueue, group string, topic string, handler common.MessageHandler) error

Subscribe 订阅 参数: - queue: 消息队列 - group: 消息组,不同的消息组的订阅者都能收到某一个主题的消息,同一个消息组的消费者只有一个能够消费消息 - topic: 主题 - handler: 消息处理函数 返回值: - 错误

func UnSubscribe

func UnSubscribe(messageQueue common.MessageQueue, group string, topic string) error

UnSubscribe 取消订阅 参数: - queue: 消息队列 - group: 消息组,不同的消息组的订阅者都能收到某一个主题的消息,同一个消息组的消费者只有一个能够消费消息 - topic: 主题 返回值: - 错误

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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