Documentation ¶
Index ¶
- Variables
- func DefaultErrorCallback(err error, msg *primitive.MessageExt)
- func InitProducerGroup(conf *RocketMQCredentials)
- func NewConsumer(setters ...Setter) error
- func SendSyncMessage(msg *MQProducerMessage) error
- type ConsumerGroup
- type ErrorCallback
- type Handler
- type MQProducerMessage
- type Producer
- type ProducerGroup
- type ProducerWrapper
- type PushConsumer
- type RocketMQCredentials
- type Setter
Constants ¶
This section is empty.
Variables ¶
View Source
var Logger = logrus.New()
Functions ¶
func DefaultErrorCallback ¶
func DefaultErrorCallback(err error, msg *primitive.MessageExt)
func InitProducerGroup ¶
func InitProducerGroup(conf *RocketMQCredentials)
func NewConsumer ¶
func SendSyncMessage ¶
func SendSyncMessage(msg *MQProducerMessage) error
Types ¶
type ConsumerGroup ¶
consumer group
type ErrorCallback ¶
type ErrorCallback func(err error, msg *primitive.MessageExt)
type MQProducerMessage ¶
type ProducerGroup ¶
type ProducerGroup struct {
// contains filtered or unexported fields
}
func (*ProducerGroup) Get ¶
func (m *ProducerGroup) Get(msg *MQProducerMessage) (*Producer, error)
type ProducerWrapper ¶
type ProducerWrapper struct {
// contains filtered or unexported fields
}
type PushConsumer ¶
type PushConsumer struct {
// contains filtered or unexported fields
}
type RocketMQCredentials ¶
type RocketMQCredentials struct { Endpoint string AccessKey string SecretKey string InstanceID string }
rocket mq connection config
type Setter ¶
type Setter func(c *PushConsumer) error
func WithConsumeGroup ¶
func WithConsumeGroup(g *ConsumerGroup) Setter
func WithConsumerModel ¶
func WithConsumerModel(model consumer.MessageModel) Setter
func WithCredentials ¶
func WithCredentials(cdt *RocketMQCredentials) Setter
func WithErrorCallback ¶
func WithErrorCallback(callback ErrorCallback) Setter
func WithHandler ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.