consumer

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Consumer

type Consumer struct {
	ID          uint64
	Queue       string
	ConsumerTag string
	// contains filtered or unexported fields
}

Consumer implements AMQP consumer

func NewConsumer

func NewConsumer(queueName string, consumerTag string, noAck bool, channel interfaces.Channel, queue *queue.Queue, qos []*qos.AmqpQos) *Consumer

NewConsumer returns new instance of Consumer

func (*Consumer) Cancel

func (consumer *Consumer) Cancel()

Cancel stops consumer and send basic.cancel method to the client

func (*Consumer) Consume

func (consumer *Consumer) Consume() bool

Consume send signal into consumer channel, than consumer can try to pop message from queue

func (*Consumer) Pause

func (consumer *Consumer) Pause()

Pause pause consumer, used by channel.flow change

func (*Consumer) Qos

func (consumer *Consumer) Qos() []*qos.AmqpQos

Qos returns consumer qos rules

func (*Consumer) Start

func (consumer *Consumer) Start()

Start starting consumer to fetch messages from queue

func (*Consumer) Stop

func (consumer *Consumer) Stop()

Stop stops consumer and remove it from queue consumers list

func (*Consumer) Tag

func (consumer *Consumer) Tag() string

Tag returns consumer tag

func (*Consumer) UnPause

func (consumer *Consumer) UnPause()

UnPause unpause consumer, used by channel.flow change

Jump to

Keyboard shortcuts

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