Documentation
¶
Overview ¶
*
- Created by Goland.
- Description:
- User: 礼凯
- Date: 2020/8/30 5:10 下午
Index ¶
- func New(cnf *config.Config, host, group, topic, accessKey, secretKey, channel string) iface.Broker
- type Broker
- func (b *Broker) AdjustRoutingKey(s *tasks.Signature)
- func (b *Broker) CloseConnections() error
- func (b *Broker) GetPendingTasks(queue string) ([]*tasks.Signature, error)
- func (b *Broker) Publish(ctx context.Context, signature *tasks.Signature) error
- func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error)
- func (b *Broker) StopConsuming()
- type ROCKETMQConnection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
type Broker struct { common.Broker common.ROCKETMQConnector // contains filtered or unexported fields }
func (*Broker) AdjustRoutingKey ¶
AdjustRoutingKey makes sure the routing key is correct. If the routing key is an empty string: a) set it to binding key for direct exchange type b) set it to default queue name
func (*Broker) CloseConnections ¶
func (*Broker) GetPendingTasks ¶
func (*Broker) StartConsuming ¶
func (b *Broker) StartConsuming(consumerTag string, concurrency int, taskProcessor iface.TaskProcessor) (bool, error)
StartConsuming enters a loop and waits for incoming messages
type ROCKETMQConnection ¶
type ROCKETMQConnection struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.