mq

package
v0.8.10 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACKMode

type ACKMode uint32
const (
	ACK_AUTO ACKMode = iota
	ACK_MANUAL
)

type ConsumerOptions

type ConsumerOptions struct {
	Topic                 string
	SubscriptionName      string
	SubscriptionType      SubscriptionType
	MessageListener       consumer.Consumer
	ACKMode               ACKMode
	RetryTimes            uint32
	MaxMessageChannelSize uint32
}

type IClient added in v0.5.0

type IClient interface {
	Send(topic string, msg string) error
	SendDelay(topic string, msg string, delay time.Duration) error
	SendDelayAt(topic string, msg string, delayAt time.Time) error
	SendAsync(topic string, msg string) error
	SendDelayAsync(topic string, msg string, delay time.Duration) error
	Subscribes(options ...ConsumerOptions)
	Subscribe(options ConsumerOptions)
	Close()
}

type SubscriptionType added in v0.5.0

type SubscriptionType int
const (

	// Exclusive there can be only 1 consumer on the same topic with the same subscription name
	Exclusive SubscriptionType = iota

	// Shared subscription mode, multiple consumer will be able to use the same subscription name
	// and the messages will be dispatched according to
	// a round-robin rotation between the connected consumers
	Shared

	// Failover subscription mode, multiple consumer will be able to use the same subscription name
	// but only 1 consumer will receive the messages.
	// If that consumer disconnects, one of the other connected consumers will start receiving messages.
	Failover

	// KeyShared subscription mode, multiple consumer will be able to use the same
	// subscription and all messages with the same key will be dispatched to only one consumer
	KeyShared
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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