Documentation ¶
Index ¶
- Constants
- func DefaultSubscriptionType() subscriptionType
- type ACKMode
- type Client
- func (c *Client) Close()
- func (c *Client) Send(topic string, msg string) error
- func (c *Client) SendAsync(topic string, msg string) error
- func (c *Client) SendDelay(topic string, msg string, delay time.Duration) error
- func (c *Client) SendDelayAsync(topic string, msg string, delay time.Duration) error
- func (c *Client) SendDelayAt(topic string, msg string, delayAt time.Time) error
- func (c *Client) SendDelayAtAsync(topic string, msg string, delayAt time.Time) error
- func (c *Client) Subscribe(options ConsumerOptions)
- func (c *Client) Subscribes(options ...ConsumerOptions)
- type ConsumerOptions
Constants ¶
View Source
const ( // Exclusive there can be only 1 consumer on the same topic with the same subscription name Exclusive subscriptionType = iota // 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 // subscription and all messages with the same key will be dispatched to only one consumer KeyShared )
View Source
const ( SERVER_URL_KEY = "mq.service-url" CONNECTION_TIMEOUT_KEY = "mq.connectionTimeout" OPERATION_TIMEOUT_KEY = "mq.operationTimeout" )
Variables ¶
This section is empty.
Functions ¶
func DefaultSubscriptionType ¶
func DefaultSubscriptionType() subscriptionType
Types ¶
type Client ¶
type Client struct { MqClient interface{} AppName string }
var MqClient *Client
func InitClient ¶
func (*Client) SendDelayAsync ¶
func (*Client) SendDelayAt ¶
func (*Client) SendDelayAtAsync ¶
func (*Client) Subscribe ¶
func (c *Client) Subscribe(options ConsumerOptions)
func (*Client) Subscribes ¶
func (c *Client) Subscribes(options ...ConsumerOptions)
Click to show internal directories.
Click to hide internal directories.