Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustNewConsumerManager ¶
func MustNewConsumerManager(cfg *StanqConfig, cq []*ConsumerQueue) queue.MessageQueue
MustNewConsumerManager
Types ¶
type ConsumeHandle ¶
type ConsumeHandler ¶
ConsumeHandler Consumer interface, used to define the methods required by the consumer
type ConsumerManager ¶
type ConsumerManager struct {
// contains filtered or unexported fields
}
ConsumerManager Consumer manager for managing multiple consumer queues
func (*ConsumerManager) Start ¶
func (cm *ConsumerManager) Start()
Start consuming messages in the queue
type ConsumerQueue ¶
type ConsumerQueue struct { GroupName string // consumer group name QueueName string // queue name Subject string // Subscribe subject Consumer ConsumeHandler // consumer object AckWaitTime int // Waiting time for Ack MaxInflight int // Maximum number of unacked messages ManualAckMode bool //Whether to manually ack Options []stan.SubscriptionOption // Subscription configuration item }
ConsumerQueue Consumer queue, used to maintain the relationship between a consumer group and queue
type Producer ¶
type Producer struct {
// contains filtered or unexported fields
}
func NewProducer ¶
func NewProducer(c *StanqConfig) (*Producer, error)
func (*Producer) AsyncPublish ¶
Click to show internal directories.
Click to hide internal directories.